public class EndOfServiceWaiter extends Object implements org.apache.hadoop.service.ServiceStateChangeListener
| Constructor and Description |
|---|
EndOfServiceWaiter(org.apache.hadoop.service.Service service)
Wait for a service; use the service name as this instance's name
|
EndOfServiceWaiter(String name,
org.apache.hadoop.service.Service service)
Wait for a service
|
| Modifier and Type | Method and Description |
|---|---|
void |
stateChanged(org.apache.hadoop.service.Service service)
Wait for service state change callbacks; notify self if the service has
now stopped
|
void |
waitForServiceToStop(long timeout) |
public EndOfServiceWaiter(org.apache.hadoop.service.Service service)
service - servicepublic EndOfServiceWaiter(String name, org.apache.hadoop.service.Service service)
name - name for messagesservice - servicepublic void waitForServiceToStop(long timeout)
throws InterruptedException,
TimeoutException
InterruptedExceptionTimeoutExceptionpublic void stateChanged(org.apache.hadoop.service.Service service)
stateChanged in interface org.apache.hadoop.service.ServiceStateChangeListenerservice - serviceCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.