Class 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 class  AbstractThriftServiceThread.ServerType  
      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      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.
      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 Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      long getActiveThreadCount()  
      static org.apache.thrift.protocol.TProtocolFactory getProtocolFactory​(boolean compress)  
      abstract org.apache.thrift.transport.TTransportFactory getTTransportFactory()  
      boolean isServing()  
      void run()  
      void setThreadStopLatch​(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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • close

        public void close()
      • isServing

        public boolean isServing()
      • getActiveThreadCount

        public long getActiveThreadCount()