public interface SessionStateManager
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLastSavepoint(SessionToken session,
java.util.UUID instanceLogId,
int nodeId,
int iteration)
Gets the name of most recent valid savepoint stored for the activity
identified by the designated instance, node and node iteration.
|
java.util.List<java.lang.String> |
getSavepoints(SessionToken session,
java.util.UUID instanceLogId,
int nodeId,
int iteration)
Gets all savepoints (except of the implicit savepoint) stored for the
activity identified by the designated instance, node and node iteration.
|
byte[] |
retrieveSessionState(SessionToken session,
java.lang.String savepoint,
java.util.UUID instanceLogId,
int nodeId,
int iteration)
Retrieves the state of a running application as a
byte[] so
that (the state of) the suspended application/session can be restored. |
ServerStream |
retrieveSessionStateIncrementally(SessionToken session,
java.lang.String savepoint,
java.util.UUID instanceLogId,
int nodeId,
int iteration)
Retrieves the state of a running application as a
ServerStream
so that (the state of) the suspended application/session can be restored. |
void |
storeSessionState(SessionToken session,
java.lang.String savepoint,
java.util.UUID instanceLogId,
int nodeId,
int iteration,
byte[] sessionState)
Stores the state of a running application so that the application can be
suspended, this resembles hibernating a system.
|
java.lang.String getLastSavepoint(SessionToken session, java.util.UUID instanceLogId, int nodeId, int iteration)
session - The session which is used to check for access rights on this
method.instanceLogId - The (unchangeable) log ID of the process instance
which runs the application.nodeId - The ID of the node which houses the application.iteration - The current iteration count of the executed node.null if the session/activity has not
been suspended yet or did not provide a savepoint when suspending.java.util.List<java.lang.String> getSavepoints(SessionToken session, java.util.UUID instanceLogId, int nodeId, int iteration)
session - The session which is used to check for access rights on this
method.instanceLogId - The (unchangeable) log ID of the process instance
which runs the application.nodeId - The ID of the node which houses the application.iteration - The current iteration count of the executed node.void storeSessionState(SessionToken session, java.lang.String savepoint, java.util.UUID instanceLogId, int nodeId, int iteration, byte[] sessionState)
byte[] which is saved by the
DataManager. The easiest way to create an appropriate array is using a
ByteArrayOutputStream and an ObjectOutputStream.session - The session which is used to check for access rights on this
method and to retrieve the agent and the corresponding
organisational position working with the application.savepoint - The name of the savepoint. If there is already a savepoint
of this name, it will be overwritten. This must not be the empty
string! If this is null, the implicit savepoint will
be used (and possibly overwritten).instanceLogId - The (unchangeable) log ID of the process instance
which runs the application.nodeId - The ID of the node which houses the application.iteration - The current iteration count of the executed node.sessionState - The state of the session or application as an
byte[] or null.byte[] retrieveSessionState(SessionToken session, java.lang.String savepoint, java.util.UUID instanceLogId, int nodeId, int iteration)
byte[] so
that (the state of) the suspended application/session can be restored.session - The session which is used to check for access rights on this
method.savepoint - The ID of the savepoint which is to be retrieved. This
must not be the empty string! If this is null, the
implicit savepoint will be used.instanceLogId - The (unchangeable) log ID of the process instance
which runs the application.nodeId - The ID of the node which houses the application.iteration - The current iteration count of the executed node.byte[]. If
no application data has been stored, an empty array will be
returned.ServerStream retrieveSessionStateIncrementally(SessionToken session, java.lang.String savepoint, java.util.UUID instanceLogId, int nodeId, int iteration)
ServerStream
so that (the state of) the suspended application/session can be restored.
The server input stream does not provide the complete content of the
underlying session state but a proxy object requesting the content
incrementally when transfered via the communication.session - The session which is used to check for access rights on this
method.savepoint - The ID of the savepoint which is to be retrieved. This
must not be the empty string! If this is null, the
implicit savepoint will be used.instanceLogId - The (unchangeable) log ID of the process instance
which runs the application.nodeId - The ID of the node which houses the application.iteration - The current iteration count of the executed node.ServerStream, that is, clients do not retrieve all of
the content of the stream at once but incrementally. If no
application data has been stored, an empty stream will be returned.