|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD | |||||||
interface StateManager
This interface is available from any GLU script using stateManager property
Each script is backed by a state machine (org.linkedin.glu.util.state.StateMachine).
| Method Summary | |
|---|---|
void
|
forceChangeState(java.lang.Object currentState, java.lang.Object error)
This method is used to change the state and should be used carefully. |
java.lang.Object
|
getFullState()
@return a map with the following definition:
[
scriptDefinition: [ mountPoint: x,
parent: x,
scriptFactory: x,
initParameters: x ], // all values provided when installing the glu script
scriptState: [
script: [x:x], // all serializable variables in the glu script
stateMachine: getState(),
timers: [[timer: x, repeatFrequency: x], ...]
]
]
|
java.lang.Object
|
getState()
@return the state of the script (from a state machine point of view) (see info
|
void
|
waitForShutdownState()
This method waits for the script to be in shutdown state: the script is put in shutdown state when the agent shutdowns. |
| Method Detail |
|---|
void forceChangeState(java.lang.Object currentState, java.lang.Object error)
currentState - the new current state (can be null in which case we keep
the current one)error - the new error state
java.lang.Object getFullState()
[
scriptDefinition: [ mountPoint: x,
parent: x,
scriptFactory: x,
initParameters: x ], // all values provided when installing the glu script
scriptState: [
script: [x:x], // all serializable variables in the glu script
stateMachine: getState(),
timers: [[timer: x, repeatFrequency: x], ...]
]
]
java.lang.Object getState()
org.linkedin.glu.util.state.StateMachine#getState())
void waitForShutdownState()
Groovy Documentation