|
ModeShape Distribution 3.5.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.InfinispanUtil
public class InfinispanUtil
A set of utility methods for Infinispan caches.
Nested Class Summary | |
---|---|
static interface |
InfinispanUtil.Combiner<T>
The interface that defines how the results should be merged |
protected static class |
InfinispanUtil.GetAllKeys<K,V>
A DistributedCallable implementation that returns the set of keys in an Infinispan cache which are stored in
memory. |
protected static class |
InfinispanUtil.GetAllMemoryKeys<K,V>
A DistributedCallable implementation that returns the set of keys in an Infinispan cache. |
protected static class |
InfinispanUtil.KeyMerger<K>
Since keys can appear more than one time e.g. multiple owners in a distributed cache, they all must be merged into a Set. |
static class |
InfinispanUtil.Location
|
static interface |
InfinispanUtil.Sequence<T>
A sequence of values. |
Field Summary | |
---|---|
protected static Logger |
LOGGER
|
Method Summary | ||
---|---|---|
static
|
execute(org.infinispan.Cache<K,V> cache,
InfinispanUtil.Location location,
org.infinispan.distexec.DistributedCallable<K,V,T> callable,
InfinispanUtil.Combiner<T> combiner)
Utility to run the supplied callable in all the processes where the cache is being run. |
|
static
|
getAllKeys(org.infinispan.Cache<K,V> cache)
Get all of the keys in the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
Method Detail |
---|
public static <K,V,T> T execute(org.infinispan.Cache<K,V> cache, InfinispanUtil.Location location, org.infinispan.distexec.DistributedCallable<K,V,T> callable, InfinispanUtil.Combiner<T> combiner) throws InterruptedException, ExecutionException
K
- the type of key used in the cacheV
- the type of value used in the cacheT
- the type of resultcache
- the cachelocation
- the location where the callable should be run; if null, InfinispanUtil.Location.LOCALLY
is usedcallable
- the callablecombiner
- the component that can combine multiple results of type T into a single result
InterruptedException
- if the process is interrupted
ExecutionException
- if there is an error while getting executing the operationpublic static <K,V> InfinispanUtil.Sequence<K> getAllKeys(org.infinispan.Cache<K,V> cache) throws org.infinispan.loaders.CacheLoaderException, InterruptedException, ExecutionException
K
- the type of keyV
- the type of valuecache
- the cache
org.infinispan.loaders.CacheLoaderException
- if there is an error within the cache loader
InterruptedException
- if the process is interrupted
ExecutionException
- if there is an error while getting all keys
|
ModeShape Distribution 3.5.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |