|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public void init() throws Exception
Exception
public void start() throws Exception
Exception
public void subscribe(String appName, HASessionState.HASessionStateListener listener)
public void unsubscribe(String appName, HASessionState.HASessionStateListener listener)
public HAPartition getCurrentHAPartition()
public String getNodeName()
public void createSession(String appName, Object keyId)
appName
- Application name for which is state is sharedkeyId
- Key identifier of the statepublic void 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
public PackagedSession getState(String appName, Object keyId)
appName
- Application hosting the statekeyId
- Key identifier of the state
public 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 statepublic void 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 ownershippublic void 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 |