|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cache.jbc.util.CacheHelper
public class CacheHelper
Helper for dealing with JBossCache Configuration.CacheMode
.
Nested Class Summary | |
---|---|
static class |
CacheHelper.Internal
|
Field Summary | |
---|---|
static String |
DUMMY
Key and value used in a hack to create region root nodes |
static String |
ITEM
Key under which items are cached |
Method Summary | |
---|---|
static org.jboss.cache.Node |
addNode(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn fqn,
boolean localOnly,
boolean resident,
org.jboss.cache.optimistic.DataVersion version)
|
static Object |
get(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key)
Builds an Fqn from region and key
and performs a JBoss Cache get(Fqn, Object) , wrapping any
exception in a CacheException . |
static Object |
getAllowingTimeout(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key)
Builds an Fqn from region and key
and performs a JBoss Cache get(Fqn, Object) , wrapping any
exception in a CacheException . |
static Set |
getChildrenNames(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn fqn)
|
static org.jboss.cache.Fqn |
getInternalFqn(org.jboss.cache.Fqn region)
|
static boolean |
isClusteredInvalidation(org.jboss.cache.Cache cache)
Is this cache participating in a cluster with invalidation? |
static boolean |
isClusteredInvalidation(org.jboss.cache.config.Configuration.CacheMode cacheMode)
Does this cache mode indicate clustered invalidation? |
static boolean |
isClusteredReplication(org.jboss.cache.Cache cache)
Is this cache participating in a cluster with replication? |
static boolean |
isClusteredReplication(org.jboss.cache.config.Configuration.CacheMode cacheMode)
Does this cache mode indicate clustered replication? |
static boolean |
isSynchronous(org.jboss.cache.Cache cache)
|
static boolean |
isSynchronous(org.jboss.cache.config.Configuration.CacheMode cacheMode)
|
static void |
put(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
Object value)
Builds an Fqn from region and key
and performs a JBoss Cache put(Object, Object) , wrapping
any exception in a CacheException . |
static void |
put(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
Object value,
org.jboss.cache.config.Option option)
Builds an Fqn from region and key
and performs a JBoss Cache put(Object, Object) , wrapping
any exception in a CacheException . |
static void |
putAllowingTimeout(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
Object value,
org.jboss.cache.config.Option option)
Builds an Fqn from region and key
and performs a JBoss Cache put(Object, Object) , ignoring any
TimeoutException and wrapping any other exception in a CacheException . |
static boolean |
putForExternalRead(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
Object value)
Builds an Fqn from region and key
and performs a JBoss Cache
putForExternalRead(Object, Object) , wrapping any
exception in a CacheException . |
static boolean |
putForExternalRead(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
Object value,
org.jboss.cache.config.Option option)
Builds an Fqn from region and key
and performs a JBoss Cache
putForExternalRead(Object, Object) , wrapping any
exception in a CacheException . |
static void |
remove(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key)
Builds an Fqn from region and key
and performs a JBoss Cache removeNode(Fqn) , wrapping any
exception in a CacheException . |
static void |
remove(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
org.jboss.cache.config.Option option)
Builds an Fqn from region and key
and performs a JBoss Cache removeNode(Fqn) , wrapping any
exception in a CacheException . |
static void |
removeAll(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region)
Performs a JBoss Cache removeNode(Fqn) , wrapping any
exception in a CacheException . |
static void |
removeAll(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
org.jboss.cache.config.Option option)
Performs a JBoss Cache removeNode(Fqn) , wrapping any
exception in a CacheException . |
static void |
removeNode(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object key,
org.jboss.cache.config.Option option)
Performs a JBoss Cache removeNode(Fqn) , wrapping any
exception in a CacheException . |
static void |
sendEvictAllNotification(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object member,
org.jboss.cache.config.Option option)
|
static void |
sendEvictNotification(org.jboss.cache.Cache cache,
org.jboss.cache.Fqn region,
Object member,
Object key,
org.jboss.cache.config.Option option)
|
static void |
setDataVersionOption(org.jboss.cache.Cache cache,
org.jboss.cache.optimistic.DataVersion version)
Creates an Option using the given DataVersion and passes
it to setInvocationOption(Cache, Option) . |
static void |
setInvocationOption(org.jboss.cache.Cache cache,
org.jboss.cache.config.Option option)
Assigns the given Option to the cache's InvocationContext . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ITEM
public static final String DUMMY
Method Detail |
---|
public static boolean isClusteredInvalidation(org.jboss.cache.Cache cache)
cache
- The cache to check.
public static boolean isClusteredInvalidation(org.jboss.cache.config.Configuration.CacheMode cacheMode)
cacheMode
- The cache to check
public static boolean isClusteredReplication(org.jboss.cache.Cache cache)
cache
- The cache to check.
public static boolean isClusteredReplication(org.jboss.cache.config.Configuration.CacheMode cacheMode)
cacheMode
- The cache to check
public static boolean isSynchronous(org.jboss.cache.Cache cache)
public static boolean isSynchronous(org.jboss.cache.config.Configuration.CacheMode cacheMode)
public static Set getChildrenNames(org.jboss.cache.Cache cache, org.jboss.cache.Fqn fqn)
public static Object get(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache get(Fqn, Object)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqn
CacheException
public static Object getAllowingTimeout(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache get(Fqn, Object)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqn
CacheException
public static void put(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, Object value) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache put(Object, Object)
, wrapping
any exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqnvalue
- data to store in the cache node
CacheException
public static void put(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, Object value, org.jboss.cache.config.Option option) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache put(Object, Object)
, wrapping
any exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqnvalue
- data to store in the cache nodeoption
- invocation Option to set for this invocation. May be
null
.
CacheException
public static void putAllowingTimeout(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, Object value, org.jboss.cache.config.Option option) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache put(Object, Object)
, ignoring any
TimeoutException
and wrapping any other exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqnvalue
- data to store in the cache nodeoption
- invocation Option to set for this invocation. May be
null
.
CacheException
public static boolean putForExternalRead(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, Object value) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache
putForExternalRead(Object, Object)
, wrapping any
exception in a CacheException
. Ignores any JBoss Cache
TimeoutException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqnvalue
- data to store in the cache node
CacheException
public static boolean putForExternalRead(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, Object value, org.jboss.cache.config.Option option) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache
putForExternalRead(Object, Object)
, wrapping any
exception in a CacheException
. Ignores any JBoss Cache
TimeoutException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqnvalue
- data to store in the cache nodeoption
- invocation Option to set for this invocation. May be
null
.
CacheException
public static void remove(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache removeNode(Fqn)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqn
CacheException
public static void remove(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, org.jboss.cache.config.Option option) throws CacheException
Fqn
from region
and key
and performs a JBoss Cache removeNode(Fqn)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionkey
- specific key to append to the region
to form
the full Fqnoption
- invocation Option to set for this invocation. May be
null
.
CacheException
public static void removeAll(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region) throws CacheException
removeNode(Fqn)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache region
CacheException
public static void removeAll(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, org.jboss.cache.config.Option option) throws CacheException
removeNode(Fqn)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionoption
- invocation Option to set for this invocation. May be
null
.
CacheException
public static void removeNode(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object key, org.jboss.cache.config.Option option) throws CacheException
removeNode(Fqn)
, wrapping any
exception in a CacheException
.
cache
- the cache to invoke onregion
- base Fqn for the cache regionoption
- invocation Option to set for this invocation. May be
null
.
CacheException
public static org.jboss.cache.Node addNode(org.jboss.cache.Cache cache, org.jboss.cache.Fqn fqn, boolean localOnly, boolean resident, org.jboss.cache.optimistic.DataVersion version) throws CacheException
CacheException
public static void setInvocationOption(org.jboss.cache.Cache cache, org.jboss.cache.config.Option option)
InvocationContext
. Does
nothing if option
is null
.
cache
- the cache. Cannot be null
.option
- the option. May be null
.Cache#getInvocationContext()}
,
InvocationContext#setOptionOverrides(Option)}
public static void setDataVersionOption(org.jboss.cache.Cache cache, org.jboss.cache.optimistic.DataVersion version)
Option
using the given DataVersion
and passes
it to setInvocationOption(Cache, Option)
.
cache
- the cache to set the Option on. Cannot be null
.version
- the DataVersion to set. Cannot be null
.public static org.jboss.cache.Fqn getInternalFqn(org.jboss.cache.Fqn region)
public static void sendEvictNotification(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object member, Object key, org.jboss.cache.config.Option option)
public static void sendEvictAllNotification(org.jboss.cache.Cache cache, org.jboss.cache.Fqn region, Object member, org.jboss.cache.config.Option option)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |