voldemort.server
Class AbstractSocketService
java.lang.Object
voldemort.common.service.AbstractService
voldemort.server.AbstractSocketService
- All Implemented Interfaces:
- VoldemortService
- Direct Known Subclasses:
- NioSocketService, SocketService
public abstract class AbstractSocketService
- extends AbstractService
- implements VoldemortService
AbstractSocketService abstracts the different implementations so that we can
use this common super class by various callers.
Method Summary |
protected void |
enableJmx(java.lang.Object obj)
If JMX is enabled, will register the given object under the service name
with which this class was created. |
int |
getPort()
Simply retrieves the port on which this service is listening for incoming
requests. |
abstract StatusManager |
getStatusManager()
Returns a StatusManager instance for use with status reporting tools. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
port
protected final int port
serviceName
protected final java.lang.String serviceName
enableJmx
protected final boolean enableJmx
AbstractSocketService
public AbstractSocketService(ServiceType type,
int port,
java.lang.String serviceName,
boolean enableJmx)
getPort
public final int getPort()
- Simply retrieves the port on which this service is listening for incoming
requests.
- Returns:
- Port number
getStatusManager
public abstract StatusManager getStatusManager()
- Returns a StatusManager instance for use with status reporting tools.
- Returns:
- StatusManager
enableJmx
protected void enableJmx(java.lang.Object obj)
- If JMX is enabled, will register the given object under the service name
with which this class was created.
- Parameters:
obj
- Object to register as an MBean
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu