public class InfinispanConnectionImpl extends BasicConnection implements InfinispanHotRodConnection
cacheName that is specified will dictate the
cache to be accessed in the container.| Constructor and Description |
|---|
InfinispanConnectionImpl(InfinispanManagedConnectionFactory config) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object key,
Object value)
Call to add an object to the cache
|
void |
clearCache(String cacheName)
Called to clear the cache and delete all objects.
|
void |
close()
Close the connection, if a connection requires closing.
|
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.client.hotrod.RemoteCache |
getCache()
Call to obtain the default cache object
|
org.infinispan.client.hotrod.RemoteCache |
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.
|
DDLHandler |
getDDLHandler()
Implement @link DDLHandler if the translator supports materialization.
|
org.infinispan.protostream.descriptors.Descriptor |
getDescriptor()
Call to return the Descriptor from JDG cache based on the root class.
|
org.infinispan.protostream.descriptors.Descriptor |
getDescriptor(Class<?> clz)
Call to return the Descriptor from JDG cache based on the specified class
|
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()
Will return
true if the CacheContainer has been started. |
Object |
remove(Object key)
Call to remove an object from the cache
|
void |
update(Object key,
Object value)
Call to update an object in the cache
|
cleanUp, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo, getXAResourceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanUppublic InfinispanConnectionImpl(InfinispanManagedConnectionFactory config) throws javax.resource.ResourceException
javax.resource.ResourceExceptionpublic Version getVersion() throws TranslatorException
ObjectConnectiongetVersion in interface ObjectConnectionTranslatorExceptionpublic void close()
close in interface javax.resource.cci.Connectionpublic boolean isAlive()
true if the CacheContainer has been started.isAlive in interface ObjectConnectionisAlive in class BasicConnectionpublic Class<?> getCacheClassType() throws TranslatorException
ObjectConnectiongetCacheClassType in interface ObjectConnectionTranslatorExceptionpublic Class<?> getCacheKeyClassType()
ObjectConnectiongetCacheKeyClassType in interface ObjectConnectionpublic org.infinispan.client.hotrod.RemoteCache getCache()
throws TranslatorException
ObjectConnectiongetCache in interface ObjectConnectionTranslatorExceptionpublic org.infinispan.protostream.descriptors.Descriptor getDescriptor()
throws TranslatorException
getDescriptor in interface InfinispanHotRodConnectionTranslatorExceptionpublic org.infinispan.protostream.descriptors.Descriptor getDescriptor(Class<?> clz) throws TranslatorException
InfinispanHotRodConnectiongetDescriptor in interface InfinispanHotRodConnectionTranslatorExceptionpublic org.infinispan.query.dsl.QueryFactory getQueryFactory()
throws TranslatorException
InfinispanHotRodConnectiongetQueryFactory in interface InfinispanHotRodConnectionTranslatorExceptionpublic void add(Object key, Object value) throws TranslatorException
add in interface ObjectConnectionTranslatorExceptionObjectConnection.add(java.lang.Object, java.lang.Object)public Object remove(Object key) throws TranslatorException
remove in interface ObjectConnectionTranslatorExceptionObjectConnection.remove(java.lang.Object)public void update(Object key, Object value) throws TranslatorException
update in interface ObjectConnectionTranslatorExceptionObjectConnection.update(java.lang.Object, java.lang.Object)public ClassRegistry getClassRegistry()
getClassRegistry in interface ObjectConnectionObjectConnection.getClassRegistry()public Object get(Object key) throws TranslatorException
get in interface ObjectConnectionkey - to use to get the object from the cacheTranslatorExceptionObjectConnection.get(java.lang.Object)public Collection<Object> getAll() throws TranslatorException
getAll in interface ObjectConnectionTranslatorExceptionObjectConnection.getAll()public DDLHandler getDDLHandler()
getDDLHandler in interface ObjectConnectionObjectConnection.getDDLHandler()public String getPkField()
getPkField in interface ObjectConnectionObjectConnection.getPkField()public String getCacheName()
getCacheName in interface ObjectConnectionObjectConnection.getCacheName()public org.infinispan.client.hotrod.RemoteCache getCache(String cacheName)
getCache in interface ObjectConnectionObjectConnection.getCache(java.lang.String)public void clearCache(String cacheName) throws TranslatorException
clearCache in interface ObjectConnectionTranslatorExceptionObjectConnection.clearCache(java.lang.String)public SearchType getSearchType()
SearchType that will be used to perform
dynamic searching of the cache.getSearchType in interface ObjectConnectionObjectConnection.getSearchType()public boolean configuredUsingAnnotations()
configuredUsingAnnotations in interface ObjectConnectionpublic boolean configuredForMaterialization()
ObjectConnectionconfiguredForMaterialization in interface ObjectConnectionCopyright © 2017 JBoss by Red Hat. All rights reserved.