org.apache.hadoop.yarn.service
Class CompositeService
java.lang.Object
org.apache.hadoop.yarn.service.AbstractService
org.apache.hadoop.yarn.service.CompositeService
- All Implemented Interfaces:
- Service
public class CompositeService
- extends AbstractService
Composition of services.
| Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service |
Service.STATE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeService
public CompositeService(String name)
getServices
public Collection<Service> getServices()
addService
protected void addService(Service service)
removeService
protected boolean removeService(Service service)
init
public void init(org.apache.hadoop.conf.Configuration conf)
- Description copied from class:
AbstractService
- Initialize the service.
The transition must be from
Service.STATE.NOTINITED to Service.STATE.INITED
unless the operation failed and an exception was raised.
- Specified by:
init in interface Service- Overrides:
init in class AbstractService
- Parameters:
conf - the configuration of the service
start
public void start()
- Description copied from class:
AbstractService
- Start the service.
The transition should be from
Service.STATE.INITED to Service.STATE.STARTED
unless the operation failed and an exception was raised.
- Specified by:
start in interface Service- Overrides:
start in class AbstractService
stop
public void stop()
- Description copied from class:
AbstractService
- Stop the service.
This operation must be designed to complete regardless of the initial state
of the service, including the state of all its internal fields.
- Specified by:
stop in interface Service- Overrides:
stop in class AbstractService
Copyright © 2012 Apache Software Foundation. All Rights Reserved.