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
|
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(Cache<K,V> cache,
InfinispanUtil.Location location,
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(Cache<K,V> cache)
Get all of the keys in the cache.
|
protected static final Logger LOGGER
public static <K,V,T> T execute(Cache<K,V> cache, InfinispanUtil.Location location, 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(Cache<K,V> cache) throws InterruptedException, ExecutionException
K
- the type of keyV
- the type of valuecache
- the cacheInterruptedException
- 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.