| Constructor and Description |
|---|
SessionImpl(CodecRegistry codecRegistry,
EmbeddedCacheManager cacheManager,
String id,
TimeService timeService) |
| 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 codec)
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 codec)
Sets the codec to use for encoding/decoding keys/values
|
void |
setCurrentCache(String cacheName)
Sets the current cache.
|
public static final Log log
public SessionImpl(CodecRegistry codecRegistry, EmbeddedCacheManager cacheManager, String id, TimeService timeService)
public EmbeddedCacheManager getCacheManager()
SessiongetCacheManager in interface Sessionpublic String getId()
Sessionpublic <K,V> Cache<K,V> getCurrentCache()
SessiongetCurrentCache in interface Sessionpublic String getCurrentCacheName()
SessiongetCurrentCacheName in interface Sessionpublic <K,V> Cache<K,V> getCache(String cacheName)
Sessionpublic void setCurrentCache(String cacheName)
SessionsetCurrentCache in interface Sessionpublic void createCache(String cacheName, String baseCacheName)
SessioncreateCache in interface SessioncacheName - the name of the new cachebaseCacheName - the existing named cache to use for defaultspublic void reset()
Sessionpublic long getTimestamp()
SessiongetTimestamp in interface Sessionpublic void setCodec(String codec) throws CodecException
SessionsetCodec in interface Sessioncodec - the name of the codec to useCodecExceptionpublic Collection<Codec> getCodecs()
Sessionpublic Codec getCodec()
Sessionpublic Codec getCodec(String codec) throws CodecException
SessiongetCodec in interface SessionCodecExceptionCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.