@InterfaceAudience.Public @InterfaceStability.Evolving public class AddingCompositeService extends 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
STOP_ONLY_STARTED_SERVICES
コンストラクタと説明 |
---|
AddingCompositeService(String name) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addService(Service service)
Add the passed
Service to the list of services managed by this
CompositeService |
boolean |
removeService(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(Service service)
CompositeService
Service
to the list of services managed by this
CompositeService
addService
クラス内 CompositeService
service
- the Service
to be addedpublic boolean removeService(Service service)
removeService
クラス内 CompositeService
Copyright © 2016 Apache Software Foundation. All rights reserved.