|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Controllable
The Controllable interface defines the methods and constants associated with lifecycle management of a node. The lifecycle management methods are called by external agents, such as Sandman.
See NodeState.html for state descriptions and valid transitions.
| Field Summary | |
|---|---|
static int |
OPERATION_FAIL
|
static int |
OPERATION_RESUME
|
static int |
OPERATION_SHUTDOWN
|
static int |
OPERATION_STARTUP
|
static java.lang.String |
OPERATION_STR_FAIL
|
static java.lang.String |
OPERATION_STR_RESUME
|
static java.lang.String |
OPERATION_STR_SHUTDOWN
|
static java.lang.String |
OPERATION_STR_STARTUP
|
static java.lang.String |
OPERATION_STR_SUSPEND
|
static java.lang.String |
OPERATION_STR_UNDEFINED
|
static java.lang.String[] |
OPERATION_STRINGS
The order of elements in this array is important; it's set up so that you can use one of the OPERATION_* constants to look up a OPERATION_STR_* constant. |
static int |
OPERATION_SUSPEND
|
static int |
OPERATION_UNDEFINED
|
static int |
SHUTDOWN_ERROR_RESTART_GLOBAL
Report an error, signal all other servers bounce their local nodes, bounce our local nodes. |
static int |
SHUTDOWN_ERROR_RESTART_LOCAL
Report an error and bounce all local nodes. |
static int |
SHUTDOWN_ERROR_TERMINATE
Report an error, signal all other servers to terminate, shut down all local nodes. |
static int |
SHUTDOWN_NORMAL
Shut down all nodes with no error. |
static int |
STATE_FAILED
|
static int |
STATE_FAILING
|
static int |
STATE_RESUMING
|
static int |
STATE_RUNNING
|
static int |
STATE_STARTING
|
static int |
STATE_STOPPED
|
static int |
STATE_STOPPING
|
static java.lang.String |
STATE_STR_FAILED
|
static java.lang.String |
STATE_STR_FAILING
|
static java.lang.String |
STATE_STR_RESUMING
|
static java.lang.String |
STATE_STR_RUNNING
|
static java.lang.String |
STATE_STR_STARTING
|
static java.lang.String |
STATE_STR_STOPPED
|
static java.lang.String |
STATE_STR_STOPPING
|
static java.lang.String |
STATE_STR_SUSPENDED
|
static java.lang.String |
STATE_STR_SUSPENDING
|
static java.lang.String |
STATE_STR_UNDEFINED
|
static java.lang.String[] |
STATE_STRINGS
The order of elements in this array is important; it's set up so that you can use one of the STATE_* constants to look up a STATE_STR_* constant. |
static int |
STATE_SUSPENDED
|
static int |
STATE_SUSPENDING
|
static int |
STATE_UNDEFINED
|
| Method Summary | |
|---|---|
void |
addWrapper(ControlWrapper wrapper)
Add this ControlWrapper to our list of wrappers to notify in the event of a state change or parameter change. |
Controllable[] |
getHelperNodes()
Return all helper nodes configured for this node. |
NodeInstance |
getNodeInstance()
Return the NodeInstance for this node instance. |
Controllable |
getParent()
If this node was configured as a helper node, return a reference to the node it is helping. |
int |
getSandNodeState()
Returns the current state of the node as one of the STATE constants. |
SandRoot |
getSandRoot()
Return the SandRoot that launched this instance. |
void |
restart()
Calls shutdown() followed by startup(). |
void |
resume()
Transition a node from the suspended state to the running state. |
void |
setHelperNodes(Controllable[] nodes)
Set the helper nodes as the specified array. |
void |
setNodeInstance(NodeInstance instance)
Called once by the root when the node instance is created. |
void |
setSandRoot(SandRoot root)
Set our back reference to the root that launched this instance. |
void |
shutdown()
Transition a node from the running to the stopped state. |
void |
startup()
Transition a node from the stopped to the running state. |
void |
suspend()
Transition a node from the running state to the suspended state. |
void |
systemwideShutdown(int code)
Signal a systemwide shutdown with the appropriate SHUTDOWN_* code. |
| Field Detail |
|---|
static final int STATE_UNDEFINED
static final int STATE_RUNNING
static final int STATE_SUSPENDED
static final int STATE_STOPPED
static final int STATE_FAILED
static final int STATE_STARTING
static final int STATE_STOPPING
static final int STATE_SUSPENDING
static final int STATE_RESUMING
static final int STATE_FAILING
static final java.lang.String STATE_STR_UNDEFINED
static final java.lang.String STATE_STR_RUNNING
static final java.lang.String STATE_STR_SUSPENDED
static final java.lang.String STATE_STR_STOPPED
static final java.lang.String STATE_STR_FAILED
static final java.lang.String STATE_STR_STARTING
static final java.lang.String STATE_STR_STOPPING
static final java.lang.String STATE_STR_SUSPENDING
static final java.lang.String STATE_STR_RESUMING
static final java.lang.String STATE_STR_FAILING
static final java.lang.String[] STATE_STRINGS
String stopped = STATE_STRINGS[STATE_STOPPED];
static final int OPERATION_UNDEFINED
static final int OPERATION_STARTUP
static final int OPERATION_SHUTDOWN
static final int OPERATION_SUSPEND
static final int OPERATION_RESUME
static final int OPERATION_FAIL
static final java.lang.String OPERATION_STR_UNDEFINED
static final java.lang.String OPERATION_STR_STARTUP
static final java.lang.String OPERATION_STR_SHUTDOWN
static final java.lang.String OPERATION_STR_SUSPEND
static final java.lang.String OPERATION_STR_RESUME
static final java.lang.String OPERATION_STR_FAIL
static final java.lang.String[] OPERATION_STRINGS
String shutdown = OPERATION_STRINGS[OPERATION_SHUTDOWN];
static final int SHUTDOWN_NORMAL
static final int SHUTDOWN_ERROR_TERMINATE
static final int SHUTDOWN_ERROR_RESTART_LOCAL
static final int SHUTDOWN_ERROR_RESTART_GLOBAL
| Method Detail |
|---|
void startup()
throws ControlException
ControlException
void shutdown()
throws ControlException
ControlException
void suspend()
throws ControlException
ControlException
void resume()
throws ControlException
ControlException
void restart()
throws ControlException
shutdown() followed by startup().
ControlExceptionint getSandNodeState()
Controllable getParent()
Controllable[] getHelperNodes()
void setHelperNodes(Controllable[] nodes)
NodeInstance getNodeInstance()
void setNodeInstance(NodeInstance instance)
SandRoot getSandRoot()
void setSandRoot(SandRoot root)
void systemwideShutdown(int code)
throws ControlException
ControlExceptionvoid addWrapper(ControlWrapper wrapper)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||