public class InfinispanCacheRAConnection extends BasicConnection implements InfinispanCacheConnection
| Constructor and Description |
|---|
InfinispanCacheRAConnection(InfinispanManagedConnectionFactory config) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object key,
Object value)
Call to add an object to the cache
|
void |
cleanUp()
Called by the
ManagedConnection to indicate the physical connection
should be cleaned up for reuse. |
void |
clearCache(String cacheName)
Called to clear the cache and delete all objects.
|
void |
close() |
boolean |
configuredForMaterialization()
Call to determine if this connection is configured for materialization.
|
boolean |
configuredUsingAnnotations()
Call to determine if the JDG cache is configured using annotation (or using protobuf and marsharllers).
|
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<Object,Object> |
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;
|
Class<?> |
getCacheClassType()
Returns root object class type
that is defined for the cache.
|
Class<?> |
getCacheKeyClassType()
Returns the class type of the key to the cache.
|
String |
getCacheName()
Returns the name of the cache
|
ClassRegistry |
getClassRegistry()
Return the ClassRegistry that contains which classes and their methods.
|
InfinispanManagedConnectionFactory |
getConfig() |
DDLHandler |
getDDLHandler()
Implement @link DDLHandler if the translator supports materialization.
|
String |
getPkField()
Returns the name of the primary key to the cache
|
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. |
Version |
getVersion()
Call to get the version of the data source that is being accessed.
|
boolean |
isAlive()
Tests the connection to see if it is still valid.
|
protected Object |
performJNDICacheLookup(String jndiName) |
Object |
remove(Object key)
Call to remove an object from the cache
|
protected void |
shutDownCacheManager() |
void |
update(Object key,
Object value)
Call to update an object in the cache
|
createInteraction, getLocalTransaction, getMetaData, getResultSetInfo, getXAResourcepublic InfinispanCacheRAConnection(InfinispanManagedConnectionFactory config)
public InfinispanManagedConnectionFactory getConfig()
public Version getVersion() throws TranslatorException
ObjectConnectiongetVersion in interface ObjectConnectionTranslatorExceptionpublic String getPkField()
getPkField in interface ObjectConnectionObjectConnection.getPkField()public Class<?> getCacheKeyClassType()
getCacheKeyClassType in interface ObjectConnectionObjectConnection.getCacheKeyClassType()public String getCacheName()
getCacheName in interface ObjectConnectionObjectConnection.getCacheName()public Class<?> getCacheClassType()
getCacheClassType in interface ObjectConnectionObjectConnection.getCacheClassType()public ClassRegistry getClassRegistry()
getClassRegistry in interface ObjectConnectionObjectConnection.getClassRegistry()public DDLHandler getDDLHandler()
ObjectConnectiongetDDLHandler in interface ObjectConnectionpublic boolean isAlive()
BasicConnectionisAlive in interface ObjectConnectionisAlive in class BasicConnectionpublic org.infinispan.Cache<Object,Object> getCache()
ObjectConnectiongetCache in interface ObjectConnectionpublic org.infinispan.Cache<Object,Object> getCache(String cacheName)
getCache in interface ObjectConnectionObjectConnection.getCache(java.lang.String)public Collection<Object> getAll() throws TranslatorException
ObjectConnectiongetAll in interface ObjectConnectionTranslatorExceptionprotected Object performJNDICacheLookup(String jndiName) throws Exception
Exceptionpublic void cleanUp()
BasicConnectionManagedConnection to indicate the physical connection
should be cleaned up for reuse.cleanUp in interface ObjectConnectioncleanUp in class BasicConnectionpublic org.infinispan.query.dsl.QueryFactory getQueryFactory()
InfinispanCacheConnectiongetQueryFactory in interface InfinispanCacheConnectionpublic Object get(Object key)
ObjectConnectionget in interface ObjectConnectionkey - to use to get the object from the cachepublic void add(Object key, Object value)
ObjectConnectionadd in interface ObjectConnectionpublic Object remove(Object key)
ObjectConnectionremove in interface ObjectConnectionpublic void update(Object key, Object value)
ObjectConnectionupdate in interface ObjectConnectionpublic void clearCache(String cacheName) throws TranslatorException
ObjectConnectionclearCache in interface ObjectConnectionTranslatorExceptionprotected void shutDownCacheManager()
public SearchType getSearchType()
SearchType that will be used to perform
dynamic searching of the cache.getSearchType in interface ObjectConnectionpublic void close()
throws javax.resource.ResourceException
close in interface javax.resource.cci.Connectionjavax.resource.ResourceExceptionConnection.close()public boolean configuredUsingAnnotations()
configuredUsingAnnotations in interface ObjectConnectionpublic boolean configuredForMaterialization()
ObjectConnectionconfiguredForMaterialization in interface InfinispanCacheConnectionconfiguredForMaterialization in interface ObjectConnectionCopyright © 2017 JBoss by Red Hat. All rights reserved.