|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Service
Service LifeCycle.
| Nested Class Summary | |
|---|---|
static class |
Service.STATE
Service states |
| Method Summary | |
|---|---|
org.apache.hadoop.conf.Configuration |
getConfig()
Get the configuration of this service. |
String |
getName()
Get the name of this service. |
Service.STATE |
getServiceState()
Get the current service state |
long |
getStartTime()
Get the service start time |
void |
init(org.apache.hadoop.conf.Configuration config)
Initialize the service. |
void |
register(ServiceStateChangeListener listener)
Register an instance of the service state change events. |
void |
start()
Start the service. |
void |
stop()
Stop the service. |
void |
unregister(ServiceStateChangeListener listener)
Unregister a previously instance of the service state change events. |
| Method Detail |
|---|
void init(org.apache.hadoop.conf.Configuration config)
Service.STATE.NOTINITED to Service.STATE.INITED
unless the operation failed and an exception was raised.
config - the configuration of the servicevoid start()
Service.STATE.INITED to Service.STATE.STARTED
unless the operation failed and an exception was raised.
void stop()
void register(ServiceStateChangeListener listener)
listener - a new listenervoid unregister(ServiceStateChangeListener listener)
listener - the listener to unregister.String getName()
org.apache.hadoop.conf.Configuration getConfig()
Service.STATE getServiceState()
long getStartTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||