|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DistributedCacheManager<T extends OutgoingDistributableSessionData>
SPI implemented by the distributed caching layer.
Method Summary | |
---|---|
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. |
Object |
getAttribute(String realId,
String key)
Get the value of the attribute with the given key from the given session. |
Set<String> |
getAttributeKeys(String realId)
Obtain the attribute keys associated with this session. |
Map<String,Object> |
getAttributes(String realId)
Return all attributes associated with this session id. |
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. |
boolean |
getSupportsAttributeOperations()
Gets whether this DistributedCacheManager supports operations on session attributes; if false the various attribute
operations in will throw UnsupportedOperationException . |
boolean |
isPassivationEnabled()
Gets whether the underlying cache supports passivation. |
void |
putAttribute(String realId,
Map<String,Object> map)
Stores the given map of attribute key/value pairs in the given session. |
void |
putAttribute(String realId,
String key,
Object value)
Stores the given value under the given key in the given session. |
Object |
removeAttribute(String realId,
String key)
Removes the attribute with the given key from the given session. |
void |
removeAttributeLocal(String realId,
String key)
Removes the attribute with the given key from the given session, but only on the local node. |
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 |
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. |
Method Detail |
---|
void start()
void stop()
BatchingManager getBatchingManager()
void sessionCreated(String realId)
realId
- the session id with any appended jvmRoute info removedvoid storeSessionData(T sessionData)
session
- 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 node
IncomingDistributableSessionData 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
Map<String,String> getSessionIds()
null
value if buddy
replication is not enabled.) Will not return null
.boolean isPassivationEnabled()
boolean getSupportsAttributeOperations()
false
the various attribute
operations in will throw UnsupportedOperationException
.
Object getAttribute(String realId, String key)
realId
- the session id with any jvmRoute removedkey
- the attribute key
null
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
void putAttribute(String realId, String key, Object value)
realId
- the session id with any jvmRoute removedkey
- the attribute keyvalue
- the previous attribute value, or null
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
void putAttribute(String realId, Map<String,Object> map)
realId
- the session id with any jvmRoute removedmap
-
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
Object removeAttribute(String realId, String key)
realId
- the session id with any jvmRoute removedkey
- the attribute key
null
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
void removeAttributeLocal(String realId, String key)
realId
- the session id with any jvmRoute removedkey
- the attribute key
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
Set<String> getAttributeKeys(String realId)
realId
- the session id with any jvmRoute removed
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
Map<String,Object> getAttributes(String realId)
realId
- the session id with any jvmRoute removed
UnsupportedOperationException
- if getSupportsAttributeOperations()
would return false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |