public interface DistributedCacheManager<T extends OutgoingDistributableSessionData>
Modifier and Type | Method and Description |
---|---|
void |
evictSession(String realId)
Evict a session from the in-memory portion of the distributed cache, on this node only.
|
void |
evictSession(String realId,
String dataOwner)
Evict a non-locally-active session from the in-memory portion of the distributed cache, on this node only.
|
BatchingManager |
getBatchingManager()
Gets the BatchingManager.
|
IncomingDistributableSessionData |
getSessionData(String realId,
boolean initialLoad)
Get the
IncomingDistributableSessionData that encapsulates the distributed cache's information about the given
session. |
IncomingDistributableSessionData |
getSessionData(String realId,
String dataOwner,
boolean includeAttributes)
Get the
IncomingDistributableSessionData that encapsulates the distributed cache's information about the given
session. |
Map<String,String> |
getSessionIds()
Gets the ids of all sessions in the underlying cache.
|
SessionOwnershipSupport |
getSessionOwnershipSupport()
Returns the session ownership support for this distributed cache manager.
|
boolean |
isLocal(String sessionId)
Indicates whether a session with the specified identifier will cache locally.
|
boolean |
isPassivationEnabled()
Gets whether the underlying cache supports passivation.
|
String |
locate(String sessionId)
Returns the jvm route of a node on which the specified session id is cached.
|
void |
removeSession(String realId)
Globally remove a session from the distributed cache.
|
void |
removeSessionLocal(String realId)
Remove a session from the distributed cache on this node only.
|
void |
removeSessionLocal(String realId,
String dataOwner)
Remove a non-locally active session from the distributed cache, but on this node only.
|
void |
sessionCreated(String realId)
Notification to the distributed cache that a session has been newly created.
|
void |
setForceSynchronous(boolean forceSynchronous)
Toggles whether or not to force cache into synchronous mode.
|
void |
start()
Starts the distributed caching layer.
|
void |
stop()
Stops the distributed caching layer.
|
void |
storeSessionData(T sessionData)
Store or update a session in the distributed cache.
|
void start()
void stop()
BatchingManager getBatchingManager()
void sessionCreated(String realId)
realId
- the session id with any appended jvmRoute info removedvoid storeSessionData(T sessionData)
sessionData
- the sessionvoid removeSession(String realId)
realId
- the session's id, excluding any jvmRoutevoid removeSessionLocal(String realId)
realId
- the session's id, excluding any jvmRoutevoid removeSessionLocal(String realId, String dataOwner)
realId
- the session's id, excluding any jvmRoutedataOwner
- identifier of node where the session is activevoid evictSession(String realId)
realId
- the session's id, excluding any jvmRoutevoid evictSession(String realId, String dataOwner)
realId
- the session's id, excluding any jvmRoutedataOwner
- identifier of node where the session is activeIncomingDistributableSessionData getSessionData(String realId, boolean initialLoad)
IncomingDistributableSessionData
that encapsulates the distributed cache's information about the given
session.realId
- the session's id, excluding any jvmRouteinitialLoad
- true
if this is the first access of this session's data on this nodeIncomingDistributableSessionData getSessionData(String realId, String dataOwner, boolean includeAttributes)
IncomingDistributableSessionData
that encapsulates the distributed cache's information about the given
session.realId
- the session's id, excluding any jvmRoutedataOwner
- identifier of node where the session is active; null
if locally active or location where
active is unknownincludeAttributes
- should IncomingDistributableSessionData.providesSessionAttributes()
return true
?Map<String,String> getSessionIds()
null
value if buddy
replication is not enabled.) Will not return null
.boolean isPassivationEnabled()
void setForceSynchronous(boolean forceSynchronous)
forceSynchronous
- true, if cache should force synchronous mode, false otherwiseSessionOwnershipSupport getSessionOwnershipSupport()
boolean isLocal(String sessionId)
sessionId
- a session identifierCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.