public interface Session
Modifier and Type | Method and Description |
---|---|
void |
createCache(String cacheName,
String baseCacheName)
Creates a new cache
|
<K,V> Cache<K,V> |
getCache(String cacheName)
Returns a named cache.
|
EmbeddedCacheManager |
getCacheManager()
Obtains the CacheManager to which this session is attached
|
Codec |
getCodec()
Returns the currently active codec used to encode/decode keys/values
|
Codec |
getCodec(String parameter)
Returns a specific codec
|
Collection<Codec> |
getCodecs()
Returns the list of available key/value codecs
|
<K,V> Cache<K,V> |
getCurrentCache()
Obtains the currently selected cache.
|
String |
getCurrentCacheName()
Returns the name of the currently selected cache.
|
String |
getId()
Returns the unique id of this session
|
long |
getTimestamp()
Returns the time the session was last accessed
|
void |
reset()
Resets the session, by aborting any dangling batches and transactions and updating the timestamp
|
void |
setCodec(String encoding)
Sets the codec to use for encoding/decoding keys/values
|
void |
setCurrentCache(String cacheName)
Sets the current cache.
|
EmbeddedCacheManager getCacheManager()
<K,V> Cache<K,V> getCurrentCache()
String getCurrentCacheName()
<K,V> Cache<K,V> getCache(String cacheName)
cacheName
- void setCurrentCache(String cacheName)
cacheName
- void createCache(String cacheName, String baseCacheName)
cacheName
- the name of the new cachebaseCacheName
- the existing named cache to use for defaultsvoid reset()
long getTimestamp()
String getId()
void setCodec(String encoding) throws CodecException
encoding
- the name of the codec to useCodecException
Collection<Codec> getCodecs()
Codec getCodec()
Codec getCodec(String parameter) throws CodecException
CodecException
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.