|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExecutionEnvironment<C extends Context>
An ExecutionEnvironment is provided to a Command
when it is being executed. The ExecutionEnvironment is used
to provide the "environment" for the Command, including;
Context in which the execution is taking placeIdentifier that uniquely represents the
specific execution request. This may be used to assist in
ensuring idempotent Command execution when an
execution is recovering.Ticket to determine the order in which the
specific Command execution is taking place.
Copyright (c) 2008. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Method Summary | |
|---|---|
C |
getContext()
Returns the Context in which an execution is taking place. |
ContextConfiguration |
getContextConfiguration()
Returns the ContextConfiguration for the Context in
which the execution is taking place. |
Identifier |
getContextIdentifier()
Returns the Identifier of the Context in which
the execution is taking place. |
Ticket |
getTicket()
Returns the unique Ticket (within the scope of the
Context) issued to the execution taking place with this
ExecutionEnvironment. |
boolean |
hasCheckpoint()
Determine if state has been previously saved (called a "checkpoint") for the currently executing Command. |
boolean |
isRecovering()
Returns if the ExecutionEnvironment is recovering due to
either a Coherence Cluster Recovery or Repartitioning event. |
Object |
loadCheckpoint()
Load the previously saved "checkpoint" state for the currently executing Command
that was stored using saveCheckpoint(Object). |
void |
removeCheckpoint()
Immediately removes any previously saved "checkpoint" state for the currently executing Command. |
void |
saveCheckpoint(Object state)
Immediately save the specified state as a "checkpoint" during the execution of a Command so that it may later be retrieved (via loadCheckpoint()). |
void |
setContext(C context)
Use this method to update the Context (as necessary) during
the execution of a Command. |
| Method Detail |
|---|
Identifier getContextIdentifier()
Identifier of the Context in which
the execution is taking place.
C getContext()
Context in which an execution is taking place.
void setContext(C context)
Context (as necessary) during
the execution of a Command.
context -
IllegalStateException - If the context value provided is nullContextConfiguration getContextConfiguration()
ContextConfiguration for the Context in
which the execution is taking place.
Ticket getTicket()
Ticket (within the scope of the
Context) issued to the execution taking place with this
ExecutionEnvironment.
This Ticket may be used to order and compare previous
executions against the same Context.
boolean isRecovering()
ExecutionEnvironment is recovering due to
either a Coherence Cluster Recovery or Repartitioning event.
boolean hasCheckpoint()
Command.
void saveCheckpoint(Object state)
Command so that it may later be retrieved (via loadCheckpoint()).
Using "checkpoints" can simplify the recovery of previous attempts at executing
a Command.
NOTE: The state must be serializable in some manner, ie: with Serializable,
Externalizable, ExternalizableLite and/or PortableObject.
state - Object loadCheckpoint()
Command
that was stored using saveCheckpoint(Object).
null if there is no previously saved "checkpoint" state.void removeCheckpoint()
Command.
NOTE: This is functionally equivalent to saveCheckpoint(Object) with null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||