voldemort.common.service
Class AbstractService

java.lang.Object
  extended by voldemort.common.service.AbstractService
All Implemented Interfaces:
VoldemortService
Direct Known Subclasses:
AbstractSocketService, AsyncOperationService, CoordinatorService, GossipService, HttpService, JmxService, RebalancerService, RestService, SchedulerService, StorageService, VoldemortServer

public abstract class AbstractService
extends java.lang.Object
implements VoldemortService

A helper template for implementing VoldemortService


Constructor Summary
AbstractService(ServiceType type)
           
 
Method Summary
 ServiceType getType()
           
 boolean isStarted()
           
 void start()
          Start the service.
protected abstract  void startInner()
           
 void stop()
          Stop the service
protected abstract  void stopInner()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractService

public AbstractService(ServiceType type)
Method Detail

getType

public ServiceType getType()
Specified by:
getType in interface VoldemortService
Returns:
The type of this service

isStarted

public boolean isStarted()
Specified by:
isStarted in interface VoldemortService
Returns:
true iff the service is started

start

public void start()
Description copied from interface: VoldemortService
Start the service.

Specified by:
start in interface VoldemortService

stop

public void stop()
Description copied from interface: VoldemortService
Stop the service

Specified by:
stop in interface VoldemortService

startInner

protected abstract void startInner()

stopInner

protected abstract void stopInner()


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu