-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostStart annotation, trace logs on component lifecycle, docs #5468
Conversation
8299371
to
684c63d
Compare
Please check the changes to the user-guide here: http://www.dataforte.net/listing/infinispan/generated-html/user_guide/user_guide.html#the_embedded_cachemanager |
684c63d
to
c9a82a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just minor comments
*/ | ||
@Deprecated | ||
public class AbstractModuleLifecycle implements ModuleLifecycle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are still 2 usage in our code:
hibernate-cache: LifecycleCallbacks
core: TestingUtil.addCacheStartingHook()
[source,java] | ||
---- | ||
|
||
try (EmbeddedCacheManager manager = new DefaultCacheManager()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... not sure if it is useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added Closeable it for symmetry with JCache's CacheManager, but probably documenting it is unnecessary.
@@ -88,9 +89,9 @@ public void testJmxOperationMetadata() throws Exception { | |||
public void testInvokeJmxOperationNotExposed() throws Exception { | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use Exceptions.expectException()
Exceptions.expectException(MBeanException.class, ServiceNotFoundException.class, () -> server.invoke(name, "stop", new Object[]{}, new String[]{}));
@@ -100,14 +101,14 @@ public void testJmxRegistrationAtStartupAndStop(Method m) throws Exception { | |||
CacheContainer otherContainer = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(otherJmxDomain, true, false); | |||
ObjectName otherName = getCacheManagerObjectName(otherJmxDomain); | |||
try { | |||
assert server.getAttribute(otherName, "CreatedCacheCount").equals("0"); | |||
assertEquals("0", server.getAttribute(otherName, "CreatedCacheCount")); | |||
} finally { | |||
otherContainer.stop(); | |||
} | |||
|
|||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use Exceptions.expectException()
. I'm not sure what .equals("0")
is doing in the line below
Exceptions.expectException(InstanceNotFoundException.class, () -> server.getAttribute(otherName, "CreatedCacheCount"));
* <p/> | ||
* | ||
* @author Tristan Tarrant | ||
* @since 9.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9.2
c9a82a0
to
12768a9
Compare
@pruivo addressed all comments |
12768a9
to
60a2f78
Compare
@tristantarrant there are some checkstyle errors in CI |
Yeah, waiting to merge the tx revert so I can rebase and have CI run again |
60a2f78
to
519d34d
Compare
Rebased |
- Deprecate AbstractModuleLifecycle and add default methods to ModuleLifecycle - Invoke modulelifecycle.cacheManagerStarted outside of the GCR start lock
- Add simple examples of initializing a CacheManager and describe shutdown - Make configuration a subchapter of the CacheManager chapter
519d34d
to
3cc0cc3
Compare
integrated! thanks @tristantarrant |
Sorry for the kitchen sink PR...
ISPN-8246 Add a PostStart annotation
- Deprecate AbstractModuleLifecycle and add default methods to ModuleLifecycle
- Invoke modulelifecycle.cacheManagerStarted outside of the GCR start lock
ISPN-8343 Add TRACE logs for component metadata loading and lifecycle invocations
ISPN-8332 Created and Running Cache stats should not count internal caches
ISPN-8352 EmbeddedCacheManager and RemoteCacheManager implement java.io.Closeable
Flesh out CacheManager docs
- Add simple examples of initializing a CacheManager and describe shutdown
- Make configuration a subchapter of the CacheManager chapter
https://issues.jboss.org/browse/ISPN-8246
https://issues.jboss.org/browse/ISPN-8343
https://issues.jboss.org/browse/ISPN-8332
https://issues.jboss.org/browse/ISPN-8352