public class Caches extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Caches.CollectableCloseableIterable<T>
This interface is provided for convenient fluent use of CloseableIterable
|
static interface |
Caches.MapCollectableCloseableIterable<K,V> |
Modifier and Type | Method and Description |
---|---|
static org.infinispan.AdvancedCache |
asyncWriteCache(org.infinispan.AdvancedCache cache,
org.infinispan.context.Flag extraFlag)
Transform a given cache into a cache that writes cache entries without
waiting for them to complete, adding an extra flag.
|
static void |
broadcastEvictAll(org.infinispan.AdvancedCache cache)
Broadcast an evict-all command with the given cache instance.
|
static <K,V> Caches.MapCollectableCloseableIterable<K,V> |
entrySet(org.infinispan.AdvancedCache<K,V> cache) |
static <K,V> Caches.MapCollectableCloseableIterable<K,V> |
entrySet(org.infinispan.AdvancedCache<K,V> cache,
org.infinispan.filter.KeyValueFilter<K,V> filter) |
static <K,V,T> Caches.MapCollectableCloseableIterable<K,T> |
entrySet(org.infinispan.AdvancedCache<K,V> cache,
org.infinispan.filter.KeyValueFilter<K,V> filter,
org.infinispan.filter.Converter<K,V,T> converter) |
static org.infinispan.AdvancedCache |
failSilentReadCache(org.infinispan.AdvancedCache cache)
Transform a given cache into a cache that fails silently if
cache reads fail.
|
static org.infinispan.AdvancedCache |
failSilentWriteCache(org.infinispan.AdvancedCache cache)
Transform a given cache into a cache that fails silently if cache writes fail.
|
static org.infinispan.AdvancedCache |
failSilentWriteCache(org.infinispan.AdvancedCache cache,
org.infinispan.context.Flag extraFlag)
Transform a given cache into a cache that fails silently if
cache writes fail, adding an extra flag.
|
static org.infinispan.AdvancedCache |
ignoreReturnValuesCache(org.infinispan.AdvancedCache cache)
Transform a given cache into a cache that ignores return values for
operations returning previous values, i.e.
|
static org.infinispan.AdvancedCache |
ignoreReturnValuesCache(org.infinispan.AdvancedCache cache,
org.infinispan.context.Flag extraFlag)
Transform a given cache into a cache that ignores return values for
operations returning previous values, i.e.
|
static boolean |
isClustered(org.infinispan.AdvancedCache cache)
Indicates whether the given cache is configured to cluster its contents.
|
static boolean |
isInvalidationCache(org.infinispan.AdvancedCache cache)
Indicates whether the given cache is configured with
CacheMode.INVALIDATION_ASYNC or
CacheMode.INVALIDATION_SYNC . |
static boolean |
isSynchronousCache(org.infinispan.AdvancedCache cache)
Indicates whether the given cache is configured with
CacheMode.REPL_SYNC ,
CacheMode.INVALIDATION_SYNC , or
CacheMode.DIST_SYNC . |
static boolean |
isTransactionalCache(org.infinispan.AdvancedCache cache) |
static <K,V> Caches.CollectableCloseableIterable<K> |
keys(org.infinispan.AdvancedCache<K,V> cache) |
static <K,V> Caches.CollectableCloseableIterable<K> |
keys(org.infinispan.AdvancedCache<K,V> cache,
org.infinispan.filter.KeyValueFilter<K,V> filter) |
static org.infinispan.AdvancedCache |
localCache(org.infinispan.AdvancedCache cache)
Transform a given cache into a local cache
|
static void |
removeAll(org.infinispan.AdvancedCache cache) |
static <K,V> Caches.CollectableCloseableIterable<V> |
values(org.infinispan.AdvancedCache<K,V> cache) |
static <K,V> Caches.CollectableCloseableIterable<V> |
values(org.infinispan.AdvancedCache<K,V> cache,
org.infinispan.filter.KeyValueFilter<K,V> filter) |
static <K,V,T> Caches.CollectableCloseableIterable<T> |
values(org.infinispan.AdvancedCache<K,V> cache,
org.infinispan.filter.KeyValueFilter<K,V> filter,
org.infinispan.filter.Converter<K,V,T> converter) |
static <T> T |
withinTx(org.infinispan.AdvancedCache cache,
Callable<T> c)
Call an operation within a transaction.
|
static <T> T |
withinTx(TransactionManager tm,
Callable<T> c)
Call an operation within a transaction.
|
static void |
withinTx(TransactionManager tm,
Runnable runnable) |
public static <T> T withinTx(org.infinispan.AdvancedCache cache, Callable<T> c) throws Exception
T
- type of callable returncache
- instance whose transaction manager to usec
- callable instance to run within a transactionException
- if any operation within the transaction failspublic static <T> T withinTx(TransactionManager tm, Callable<T> c) throws Exception
T
- type of callable returntm
- transaction managerc
- callable instance to run within a transactionException
- if any operation within the transaction failspublic static void withinTx(TransactionManager tm, Runnable runnable) throws Exception
Exception
public static org.infinispan.AdvancedCache localCache(org.infinispan.AdvancedCache cache)
cache
- to be transformedpublic static org.infinispan.AdvancedCache ignoreReturnValuesCache(org.infinispan.AdvancedCache cache)
BasicCache.put(Object, Object)
cache
- to be transformedpublic static org.infinispan.AdvancedCache ignoreReturnValuesCache(org.infinispan.AdvancedCache cache, org.infinispan.context.Flag extraFlag)
BasicCache.put(Object, Object)
,
adding an extra flag.cache
- to be transformedextraFlag
- to add to the returned cachepublic static org.infinispan.AdvancedCache asyncWriteCache(org.infinispan.AdvancedCache cache, org.infinispan.context.Flag extraFlag)
cache
- to be transformedextraFlag
- to add to the returned cachepublic static org.infinispan.AdvancedCache failSilentWriteCache(org.infinispan.AdvancedCache cache)
cache
- to be transformedpublic static org.infinispan.AdvancedCache failSilentWriteCache(org.infinispan.AdvancedCache cache, org.infinispan.context.Flag extraFlag)
cache
- to be transformedextraFlag
- to be added to returned cachepublic static org.infinispan.AdvancedCache failSilentReadCache(org.infinispan.AdvancedCache cache)
cache
- to be transformedpublic static void broadcastEvictAll(org.infinispan.AdvancedCache cache)
cache
- instance used to broadcast commandpublic static boolean isInvalidationCache(org.infinispan.AdvancedCache cache)
CacheMode.INVALIDATION_ASYNC
or
CacheMode.INVALIDATION_SYNC
.cache
- to check for invalidation configurationpublic static boolean isSynchronousCache(org.infinispan.AdvancedCache cache)
CacheMode.REPL_SYNC
,
CacheMode.INVALIDATION_SYNC
, or
CacheMode.DIST_SYNC
.cache
- to check for synchronous configurationpublic static boolean isClustered(org.infinispan.AdvancedCache cache)
CacheMode.LOCAL
cache
- to check whether it clusters its contentspublic static boolean isTransactionalCache(org.infinispan.AdvancedCache cache)
public static void removeAll(org.infinispan.AdvancedCache cache)
public static <K,V> Caches.CollectableCloseableIterable<K> keys(org.infinispan.AdvancedCache<K,V> cache)
public static <K,V> Caches.CollectableCloseableIterable<K> keys(org.infinispan.AdvancedCache<K,V> cache, org.infinispan.filter.KeyValueFilter<K,V> filter)
public static <K,V> Caches.CollectableCloseableIterable<V> values(org.infinispan.AdvancedCache<K,V> cache)
public static <K,V> Caches.CollectableCloseableIterable<V> values(org.infinispan.AdvancedCache<K,V> cache, org.infinispan.filter.KeyValueFilter<K,V> filter)
public static <K,V,T> Caches.CollectableCloseableIterable<T> values(org.infinispan.AdvancedCache<K,V> cache, org.infinispan.filter.KeyValueFilter<K,V> filter, org.infinispan.filter.Converter<K,V,T> converter)
public static <K,V> Caches.MapCollectableCloseableIterable<K,V> entrySet(org.infinispan.AdvancedCache<K,V> cache)
public static <K,V> Caches.MapCollectableCloseableIterable<K,V> entrySet(org.infinispan.AdvancedCache<K,V> cache, org.infinispan.filter.KeyValueFilter<K,V> filter)
public static <K,V,T> Caches.MapCollectableCloseableIterable<K,T> entrySet(org.infinispan.AdvancedCache<K,V> cache, org.infinispan.filter.KeyValueFilter<K,V> filter, org.infinispan.filter.Converter<K,V,T> converter)
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.