|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.cache.infinispan.util.Caches
public class Caches
Helper for dealing with Infinispan cache instances.
| Method Summary | ||
|---|---|---|
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 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 org.infinispan.AdvancedCache |
localCache(org.infinispan.AdvancedCache cache)
Transform a given cache into a local cache |
|
static void |
removeAll(org.infinispan.AdvancedCache cache)
|
|
static
|
withinTx(org.infinispan.AdvancedCache cache,
Callable<T> c)
Call an operation within a transaction. |
|
static
|
withinTx(TransactionManager tm,
Callable<T> c)
Call an operation within a transaction. |
|
static void |
withinTx(TransactionManager tm,
Runnable runnable)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 transaction
Exception - if any operation within the transaction fails
public static <T> T withinTx(TransactionManager tm,
Callable<T> c)
throws Exception
T - type of callable returntm - transaction managerc - callable instance to run within a transaction
Exception - if any operation within the transaction fails
public static void withinTx(TransactionManager tm,
Runnable runnable)
throws Exception
Exceptionpublic static org.infinispan.AdvancedCache localCache(org.infinispan.AdvancedCache cache)
cache - to be transformed
public static org.infinispan.AdvancedCache ignoreReturnValuesCache(org.infinispan.AdvancedCache cache)
BasicCache.put(Object, Object)
cache - to be transformed
public 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 cache
public static org.infinispan.AdvancedCache asyncWriteCache(org.infinispan.AdvancedCache cache,
org.infinispan.context.Flag extraFlag)
cache - to be transformedextraFlag - to add to the returned cache
public static org.infinispan.AdvancedCache failSilentWriteCache(org.infinispan.AdvancedCache cache)
cache - to be transformed
public static org.infinispan.AdvancedCache failSilentWriteCache(org.infinispan.AdvancedCache cache,
org.infinispan.context.Flag extraFlag)
cache - to be transformedextraFlag - to be added to returned cache
public static org.infinispan.AdvancedCache failSilentReadCache(org.infinispan.AdvancedCache cache)
cache - to be transformed
public 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 configuration
public static boolean isSynchronousCache(org.infinispan.AdvancedCache cache)
CacheMode.REPL_SYNC,
CacheMode.INVALIDATION_SYNC, or
CacheMode.DIST_SYNC.
cache - to check for synchronous configuration
public static boolean isClustered(org.infinispan.AdvancedCache cache)
CacheMode.LOCAL
cache - to check whether it clusters its contents
public static void removeAll(org.infinispan.AdvancedCache cache)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||