-
1. Few questions about ISPN
galder.zamarreno Feb 17, 2011 10:55 AM (in response to amalrajvinoth)Re 1. Not for the same cache. A config can contain N caches and each cache can only have one cluster mode.
Re 2. No
Re 3. Hmmm, not in an easy way. IIRC, EmbeddedCacheManager.getMembers will get you logical addresses. However, each node prints at INFO level their logical to physical (IP) address. What do you wanna use with this info exactly?
Re 3. You should check the testsuite, there should be a few with those - https://github.com/infinispan/infinispan - Once you've written your interceptor/listeners, maybe you could add them as examples to the custom listener ( http://community.jboss.org/docs/DOC-14871 ) and custom interceptor ( http://community.jboss.org/docs/DOC-14852 ) wikise?
Re 4. You can't switch from async to sync at runtime. But, you can configure your cache to be sync and then call getAsync/putAsync/...etc methods to get async calls. http://community.jboss.org/docs/DOC-14872
-
2. Few questions about ISPN
galder.zamarreno Feb 17, 2011 10:57 AM (in response to galder.zamarreno)Re 1. One more thing, even if a cache can only have one mode, using flags, you can make an operation stay local, even if the underlying cache is configured with distribution or replication...etc
-
3. Re: Few questions about ISPN
amalrajvinoth Feb 21, 2011 1:41 AM (in response to galder.zamarreno)thanks for ur response.
Galder Zamarreño wrote:
Re 1. One more thing, even if a cache can only have one mode, using flags, you can make an operation stay local, even if the underlying cache is configured with distribution or replication...etc
you mean using config.setMode("LOCAL"); will this work at runtime?
- No of threads maintainded in ISPN, is it per VM or per data structure?
when i try to check using Thread.getAllStackTraces().size(), it gave me 22. is it per data structure?.
2. In invalidation, when i clear node A, node B also gets clear, How is it done? are they sharing same cache?
regards,
amal.
-
4. Re: Few questions about ISPN
galder.zamarreno Feb 24, 2011 6:00 AM (in response to amalrajvinoth)Amal Raj Vinoth James wrote:
thanks for ur response.
Galder Zamarreño wrote:
Re 1. One more thing, even if a cache can only have one mode, using flags, you can make an operation stay local, even if the underlying cache is configured with distribution or replication...etc
you mean using config.setMode("LOCAL"); will this work at runtime?
No, you can change the config, but you can use flags to make cache operations local, i.e.
cache.withFlags(CACHE_MODE_LOCAL).put("k", "v");
The put will be local only regardless of whether the cache is configured with replication/distribution etc.... There's a bunch of other flags that can be used to tweak calls. We need a wiki on this...
- No of threads maintainded in ISPN, is it per VM or per data structure?
when i try to check using Thread.getAllStackTraces().size(), it gave me 22. is it per data structure?.
Infinispan maintains several threads to provide some functionality, i.e. replication queue...etc. Normally, the executors powering these are per cache manager.
2. In invalidation, when i clear node A, node B also gets clear, How is it done? are they sharing same cache?
Well, when a key is invalidated in a cache, all caches in the cluster get that key removed as well. How is it done? See the code, uses JGroups to send rpcs.
-
5. Re: Few questions about ISPN
galder.zamarreno Feb 24, 2011 6:01 AM (in response to galder.zamarreno)Clearly, CACHE_MODE_LOCAL comes from org.infinispan.context.Flag enum, and withFlags() is a method of AdvancedCache, and you can get hold of advanced cache via: Cache.getAdvancedCache()