@InterfaceAudience.Public
@InterfaceStability.Evolving
public class AddingCompositeService
extends org.apache.hadoop.service.CompositeService
This allows external classes to add services to these methods, after which they follow the same lifecyce.
It is essential that any service added is in a state where it can be moved
on with that of the parent services. Specifically, do not add an uninited
service to a parent that is already inited —as the start
operation will then fail
Constructor and Description |
---|
AddingCompositeService(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addService(org.apache.hadoop.service.Service service) |
boolean |
removeService(org.apache.hadoop.service.Service service) |
addIfService, getServices, serviceInit, serviceStart, serviceStop
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public AddingCompositeService(String name)
public void addService(org.apache.hadoop.service.Service service)
addService
in class org.apache.hadoop.service.CompositeService
public boolean removeService(org.apache.hadoop.service.Service service)
removeService
in class org.apache.hadoop.service.CompositeService
Copyright © 2008–2019 Apache Software Foundation. All rights reserved.