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 |
close() |
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
|
Map<Object,Object> |
getCache()
Call to obtain the cache object
|
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.
|
protected InfinispanManagedConnectionFactory |
getConfig() |
Collection<Object> |
getFirst(int limit)
Call to obtain all the first number of objects based on limit
|
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.
|
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, getXAResource, isAlive
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanUp, isAlive
public InfinispanCacheRAConnection(InfinispanManagedConnectionFactory config)
protected InfinispanManagedConnectionFactory getConfig()
public Map<Object,Object> getCache()
getCache
in interface ObjectConnection
ObjectConnection.getCache()
public Collection<Object> getAll()
getAll
in interface ObjectConnection
ObjectConnection.getAll()
public Collection<Object> getFirst(int limit)
getFirst
in interface ObjectConnection
limit
- is the number of objects to returnObjectConnection.getFirst(int)
public org.infinispan.query.dsl.QueryFactory getQueryFactory() throws TranslatorException
getQueryFactory
in interface InfinispanCacheConnection
TranslatorException
org.teiid.translator.infinispanCache.InfinispanCacheConnection#getQueryFactory()
public String getPkField()
getPkField
in interface ObjectConnection
ObjectConnection.getPkField()
public Class<?> getCacheKeyClassType()
getCacheKeyClassType
in interface ObjectConnection
ObjectConnection.getCacheKeyClassType()
public String getCacheName()
getCacheName
in interface ObjectConnection
ObjectConnection.getCacheName()
public Class<?> getCacheClassType()
getCacheClassType
in interface ObjectConnection
ObjectConnection.getCacheClassType()
public void add(Object key, Object value) throws TranslatorException
add
in interface ObjectConnection
TranslatorException
ObjectConnection.add(java.lang.Object, java.lang.Object)
public Object remove(Object key) throws TranslatorException
remove
in interface ObjectConnection
TranslatorException
ObjectConnection.remove(java.lang.Object)
public void update(Object key, Object value) throws TranslatorException
update
in interface ObjectConnection
TranslatorException
ObjectConnection.update(java.lang.Object, java.lang.Object)
public ClassRegistry getClassRegistry()
getClassRegistry
in interface ObjectConnection
ObjectConnection.getClassRegistry()
public Object get(Object key) throws TranslatorException
get
in interface ObjectConnection
key
- to use to get the object from the cacheTranslatorException
ObjectConnection.get(java.lang.Object)
public void close()
close
in interface javax.resource.cci.Connection
Connection.close()
Copyright © 2013–2015 JBoss by Red Hat. All rights reserved.