public class ClosingService<C extends Closeable>
extends org.apache.hadoop.service.AbstractService
| Constructor and Description |
|---|
ClosingService(C closeable)
Construct an instance of the service, using the default name
|
ClosingService(String name) |
ClosingService(String name,
C closeable)
Construct an instance of the service
|
| Modifier and Type | Method and Description |
|---|---|
C |
getCloseable()
Get the closeable
|
protected void |
serviceStop()
Stop routine will close the closeable -if not null - and set the
reference to null afterwards
This operation does raise any exception on the close, though it does
record it
|
void |
setCloseable(C closeable)
Set or update the closeable.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic ClosingService(String name)
public ClosingService(String name, C closeable)
name - service namecloseable - closeable to close (may be null)public ClosingService(C closeable)
closeable - closeable to close (may be null)public C getCloseable()
public void setCloseable(C closeable)
closeable - protected void serviceStop()
serviceStop in class org.apache.hadoop.service.AbstractServiceCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.