Package org.apache.iotdb.commons.service
Class AbstractThriftServiceThread
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.iotdb.commons.service.AbstractThriftServiceThread
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
ThriftServiceThread
public abstract class AbstractThriftServiceThread extends java.lang.Thread
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractThriftServiceThread.ServerType
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractThriftServiceThread(org.apache.thrift.TBaseAsyncProcessor<?> processor, java.lang.String serviceName, java.lang.String threadsName, java.lang.String bindAddress, int port, int selectorThreads, int minWorkerThreads, int maxWorkerThreads, int timeoutSecond, org.apache.thrift.server.TServerEventHandler serverEventHandler, boolean compress, int connectionTimeoutInMS, int maxReadBufferBytes, AbstractThriftServiceThread.ServerType serverType)for asynced ThriftService.protectedAbstractThriftServiceThread(org.apache.thrift.TProcessor processor, java.lang.String serviceName, java.lang.String threadsName, java.lang.String bindAddress, int port, int maxWorkerThreads, int timeoutSecond, org.apache.thrift.server.TServerEventHandler serverEventHandler, boolean compress)for synced ThriftServiceThread
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()longgetActiveThreadCount()static org.apache.thrift.protocol.TProtocolFactorygetProtocolFactory(boolean compress)abstract org.apache.thrift.transport.TTransportFactorygetTTransportFactory()booleanisServing()voidrun()voidsetThreadStopLatch(java.util.concurrent.CountDownLatch threadStopLatch)-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
AbstractThriftServiceThread
protected AbstractThriftServiceThread(org.apache.thrift.TBaseAsyncProcessor<?> processor, java.lang.String serviceName, java.lang.String threadsName, java.lang.String bindAddress, int port, int selectorThreads, int minWorkerThreads, int maxWorkerThreads, int timeoutSecond, org.apache.thrift.server.TServerEventHandler serverEventHandler, boolean compress, int connectionTimeoutInMS, int maxReadBufferBytes, AbstractThriftServiceThread.ServerType serverType)for asynced ThriftService.
-
AbstractThriftServiceThread
protected AbstractThriftServiceThread(org.apache.thrift.TProcessor processor, java.lang.String serviceName, java.lang.String threadsName, java.lang.String bindAddress, int port, int maxWorkerThreads, int timeoutSecond, org.apache.thrift.server.TServerEventHandler serverEventHandler, boolean compress)for synced ThriftServiceThread
-
-
Method Detail
-
getTTransportFactory
public abstract org.apache.thrift.transport.TTransportFactory getTTransportFactory()
-
getProtocolFactory
public static org.apache.thrift.protocol.TProtocolFactory getProtocolFactory(boolean compress)
-
setThreadStopLatch
public void setThreadStopLatch(java.util.concurrent.CountDownLatch threadStopLatch)
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
close
public void close()
-
isServing
public boolean isServing()
-
getActiveThreadCount
public long getActiveThreadCount()
-
-