Package org.apache.iotdb.commons.service
Class ThriftService
- java.lang.Object
-
- org.apache.iotdb.commons.service.ThriftService
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringmbeanNameprotected org.apache.thrift.TProcessorprocessorstatic java.lang.StringSTATUS_DOWNstatic java.lang.StringSTATUS_UPprotected AbstractThriftServiceThreadthriftServiceThread
-
Constructor Summary
Constructors Constructor Description ThriftService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetBindIP()abstract intgetBindPort()java.lang.StringgetRPCServiceStatus()voidinitAsyncedServiceImpl(java.lang.Object serviceImpl)voidinitSyncedServiceImpl(java.lang.Object serviceImpl)abstract voidinitThriftServiceThread()abstract voidinitTProcessor()voidrestartService()voidstart()Start current service.voidstartService()voidstop()Stop current service.voidstopService()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iotdb.commons.service.IService
getID, shutdown, waitAndStop
-
-
-
-
Field Detail
-
STATUS_UP
public static final java.lang.String STATUS_UP
- See Also:
- Constant Field Values
-
STATUS_DOWN
public static final java.lang.String STATUS_DOWN
- See Also:
- Constant Field Values
-
mbeanName
protected java.lang.String mbeanName
-
thriftServiceThread
protected AbstractThriftServiceThread thriftServiceThread
-
processor
protected org.apache.thrift.TProcessor processor
-
-
Method Detail
-
getRPCServiceStatus
public java.lang.String getRPCServiceStatus()
-
start
public void start() throws StartupExceptionDescription copied from interface:IServiceStart current service.- Specified by:
startin interfaceIService- Throws:
StartupException
-
stop
public void stop()
Description copied from interface:IServiceStop current service. If current service uses thread or thread pool, current service should guarantee to putBack thread or thread pool.
-
initSyncedServiceImpl
public void initSyncedServiceImpl(java.lang.Object serviceImpl)
-
initAsyncedServiceImpl
public void initAsyncedServiceImpl(java.lang.Object serviceImpl)
-
initTProcessor
public abstract void initTProcessor() throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.NoSuchMethodExceptionjava.lang.reflect.InvocationTargetException
-
initThriftServiceThread
public abstract void initThriftServiceThread() throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.ClassNotFoundException- Throws:
java.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.ClassNotFoundException
-
getBindIP
public abstract java.lang.String getBindIP()
-
getBindPort
public abstract int getBindPort()
-
startService
public void startService() throws StartupException- Throws:
StartupException
-
restartService
public void restartService() throws StartupException- Throws:
StartupException
-
stopService
public void stopService()
-
-