K - V - public class LocalCacheConnection<K,V> extends InfinispanCacheWrapper<K,V>
jndiName| Constructor and Description |
|---|
LocalCacheConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object key,
Object value)
Call to add an object to the cache
|
void |
cleanUp()
Called to enable the connection to cleanup after use
|
void |
clearCache(String cacheName)
Called to clear the cache and delete all objects.
|
Object |
get(Object key)
Call to obtain an object from the cache based on the specified key
|
Collection<Object> |
getAll()
Call to obtain all the objects from the cache
|
org.infinispan.Cache |
getCache()
Call to obtain the default cache object
|
org.infinispan.Cache<Object,Object> |
getCache(String cacheName)
Call to obtain the cache object based on the provided cacheName;
|
InfinispanManagedConnectionFactory |
getConfig() |
org.infinispan.query.dsl.QueryFactory |
getQueryFactory()
Call to return the QueryFactory that based on the type of Search used.
|
SearchType |
getSearchType()
Returns the
SearchType that will be used to perform
dynamic searching of the cache. |
void |
init(InfinispanManagedConnectionFactory config)
Called so the wrapper, with the configuration, can create the cache manager it will use
|
void |
init(InfinispanManagedConnectionFactory config,
Object cacheManager)
Called to pass in the cacheManager it will use.
|
boolean |
isAlive()
Call to check the status of the connection
|
protected Object |
performJNDICacheLookup(String jndiName) |
Object |
remove(Object key)
Call to remove an object from the cache
|
protected void |
shutDownCacheManager()
Note: This is used in testing only to enable shutting down the cache so that the next test can recreate it
Provided for testing purposes
|
void |
update(Object key,
Object value)
Call to update an object in the cache
|
getCacheClassType, getCacheKeyClassType, getCacheName, getClassRegistry, getMaterializeLifeCycle, getPkFieldpublic InfinispanManagedConnectionFactory getConfig()
getConfig in class InfinispanCacheWrapper<K,V>public void init(InfinispanManagedConnectionFactory config, Object cacheManager)
InfinispanCacheWrapperinit in class InfinispanCacheWrapper<K,V>cacheManager - objectpublic void init(InfinispanManagedConnectionFactory config) throws javax.resource.ResourceException
InfinispanCacheWrapperinit in class InfinispanCacheWrapper<K,V>javax.resource.ResourceExceptionpublic boolean isAlive()
ObjectConnection.isAlive()public org.infinispan.Cache getCache()
ObjectConnection.getCache()public org.infinispan.Cache<Object,Object> getCache(String cacheName)
ObjectConnection.getCache(java.lang.String)public Collection<Object> getAll()
ObjectConnection.getAll()protected Object performJNDICacheLookup(String jndiName) throws Exception
Exceptionpublic void cleanUp()
ObjectConnection.cleanUp()public org.infinispan.query.dsl.QueryFactory getQueryFactory()
InfinispanCacheConnection.getQueryFactory()public Object get(Object key)
key - to use to get the object from the cacheObjectConnection.get(java.lang.Object)public Object remove(Object key)
ObjectConnection.remove(java.lang.Object)public void clearCache(String cacheName) throws TranslatorException
TranslatorExceptionObjectConnection.clearCache(java.lang.String)protected void shutDownCacheManager()
shutDownCacheManager in class InfinispanCacheWrapper<K,V>InfinispanCacheWrapper.shutDownCacheManager()public SearchType getSearchType()
SearchType that will be used to perform
dynamic searching of the cache.Copyright © 2016 JBoss by Red Hat. All rights reserved.