|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HASessionState
Interface for services providing clustered state session availability
Revisions:
HASessionStateImpl
Nested Class Summary | |
---|---|
static interface |
HASessionState.HASessionStateListener
Information that can be used to clean a cache for example. |
Method Summary | |
---|---|
void |
createSession(String appName,
Object keyId)
Share a new session state in the sub-partition of this cluster |
HAPartition |
getCurrentHAPartition()
|
String |
getNodeName()
Return the name of this node as used in the computations |
PackagedSession |
getState(String appName,
Object keyId)
Get a particular state |
PackagedSession |
getStateWithOwnership(String appName,
Object keyId)
Get a state and, if it is not already the case, takes its ownership (a state is always owned by a node) |
void |
init()
|
void |
removeSession(String appName,
Object keyId)
Remove a session from the sub-partition |
void |
setState(String appName,
Object keyId,
byte[] state)
Modifies a state already shared |
void |
start()
|
void |
subscribe(String appName,
HASessionState.HASessionStateListener listener)
Subscribe to receive notifications when objects gets modified on another node. |
void |
takeOwnership(String appName,
Object keyId)
Take ownership of a state. |
void |
unsubscribe(String appName,
HASessionState.HASessionStateListener listener)
|
Method Detail |
---|
void init() throws Exception
Exception
void start() throws Exception
Exception
void subscribe(String appName, HASessionState.HASessionStateListener listener)
void unsubscribe(String appName, HASessionState.HASessionStateListener listener)
HAPartition getCurrentHAPartition()
String getNodeName()
void createSession(String appName, Object keyId)
appName
- Application name for which is state is sharedkeyId
- Key identifier of the statevoid setState(String appName, Object keyId, byte[] state) throws RemoteException
appName
- Application name hosting this statekeyId
- Key identifier of the state to modifystate
- New state
RemoteException
PackagedSession getState(String appName, Object keyId)
appName
- Application hosting the statekeyId
- Key identifier of the state
PackagedSession getStateWithOwnership(String appName, Object keyId) throws RemoteException
appName
- Application hosting the statekeyId
- Key identifier of the state
RemoteException
- Thrown if an exception occurs while getting the ownership of the statevoid takeOwnership(String appName, Object keyId) throws RemoteException
appName
- Application hosting the statekeyId
- Key identifier of the state
RemoteException
- Trown if a communication exception occurs while asking other node to get the ownershipvoid removeSession(String appName, Object keyId)
appName
- Application hosting the statekeyId
- Key identifier of the state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |