Package org.apache.thrift.server
Class TThreadPoolServer
- java.lang.Object
-
- org.apache.thrift.server.TServer
-
- org.apache.thrift.server.TThreadPoolServer
-
public class TThreadPoolServer extends TServer
Server which uses Java's built in ThreadPool management to spawn off a worker pool that deals with client connections in blocking way.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TThreadPoolServer.Args
-
Nested classes/interfaces inherited from class org.apache.thrift.server.TServer
TServer.AbstractServerArgs<T extends TServer.AbstractServerArgs<T>>
-
-
Field Summary
-
Fields inherited from class org.apache.thrift.server.TServer
eventHandler_, inputProtocolFactory_, inputTransportFactory_, outputProtocolFactory_, outputTransportFactory_, processorFactory_, serverTransport_, stopped_
-
-
Constructor Summary
Constructors Constructor Description TThreadPoolServer(TThreadPoolServer.Args args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
execute()
protected java.util.concurrent.ExecutorService
getExecutorService()
protected boolean
preServe()
void
serve()
The run method fires up the server and gets things going.void
stop()
Stop the server.protected boolean
waitForShutdown()
-
Methods inherited from class org.apache.thrift.server.TServer
getEventHandler, getShouldStop, isServing, setServerEventHandler, setServing, setShouldStop
-
-
-
-
Constructor Detail
-
TThreadPoolServer
public TThreadPoolServer(TThreadPoolServer.Args args)
-
-
Method Detail
-
getExecutorService
protected java.util.concurrent.ExecutorService getExecutorService()
-
preServe
protected boolean preServe()
-
serve
public void serve()
Description copied from class:TServer
The run method fires up the server and gets things going.
-
execute
protected void execute()
-
waitForShutdown
protected boolean waitForShutdown()
-
-