public class InfinispanUtil extends Object
Modifier and Type | Class and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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)
Utility to run the supplied callable in all the processes where the cache is being run.
|
static <K,V> InfinispanUtil.Sequence<K> |
getAllKeys(org.infinispan.Cache<K,V> cache)
Get all of the keys in the cache.
|
protected static final Logger LOGGER
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 resultInterruptedException
- if the process is interruptedExecutionException
- 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 cacheorg.infinispan.loaders.CacheLoaderException
- if there is an error within the cache loaderInterruptedException
- if the process is interruptedExecutionException
- if there is an error while getting all keysCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.