public class ServerStatusTool extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SHUTDOWN_TIMEOUT
Default number of seconds watch-shutdown should wait for the state to
change from STOPPING to STOPPED or STOPPED_WITH_ERR before giving up.
|
static int |
DEFAULT_STARTING_TIMEOUT
Default number of seconds watch-startup should wait for the state to
change from NOT_STARTING to STARTING before giving up.
|
static int |
DEFAULT_STARTUP_TIMEOUT
Default number of seconds watch-startup should wait for the state to
change from STARTING to STARTED or STARTUP_FAILED before giving up.
|
static int |
DEFAULT_STOPPING_TIMEOUT
Default number of seconds watch-shutdown should wait for the state to
change from STARTED to STOPPING before giving up.
|
| Constructor and Description |
|---|
ServerStatusTool(File serverHome) |
| Modifier and Type | Method and Description |
|---|---|
void |
init()
If the server appears not to be running, initialize the status file to
indicate that the server is not running and has not yet indicated that it
is starting (NOT_STARTING).
|
static void |
main(String[] args) |
void |
showStatus()
Show a human-readable form of the latest message in the server status
file.
|
void |
watchShutdown(int stoppingTimeout,
int shutdownTimeout)
Watch the status file and print details to standard output until the
STOPPED or STOPPED_WITH_ERR state is encountered.
|
void |
watchStartup(int startingTimeout,
int startupTimeout)
Watch the status file and print details to standard output until the
STARTED or STARTUP_FAILED state is encountered.
|
public static final int DEFAULT_STARTING_TIMEOUT
public static final int DEFAULT_STARTUP_TIMEOUT
public static final int DEFAULT_STOPPING_TIMEOUT
public static final int DEFAULT_SHUTDOWN_TIMEOUT
public void init()
throws Exception
Exceptionpublic void watchStartup(int startingTimeout,
int startupTimeout)
throws Exception
Exceptionpublic void watchShutdown(int stoppingTimeout,
int shutdownTimeout)
throws Exception
Exceptionpublic void showStatus()
throws Exception
STATE : Some State AS OF : 2006-03-29 06:44:23AM EST DETAIL : Detail line 1, if it exists Detail line 2, if it exists Detail line 3, etc..
Exceptionpublic static void main(String[] args)
Copyright © 2013 DuraSpace. All Rights Reserved.