org.apache.blur.thrift.server
Class TThreadedSelectorServer
java.lang.Object
org.apache.blur.thirdparty.thrift_0_9_0.server.TServer
org.apache.blur.thrift.server.AbstractNonblockingServer
org.apache.blur.thrift.server.TThreadedSelectorServer
public class TThreadedSelectorServer
- extends AbstractNonblockingServer
A Half-Sync/Half-Async server with a separate pool of threads to handle
non-blocking I/O. Accepts are handled on a single thread, and a configurable
number of nonblocking selector threads manage reading and writing of client
connections. A synchronous worker thread pool handles processing of requests.
Performs better than TNonblockingServer/THsHaServer in multi-core
environments when the the bottleneck is CPU on the single selector thread
handling I/O. In addition, because the accept handling is decoupled from
reads/writes and invocation, the server has better ability to handle back-
pressure from new connections (e.g. stop accepting when busy).
Like TNonblockingServer, it relies on the use of TFramedTransport.
Method Summary |
void |
stop()
Stop serving and shut everything down. |
TThreadedSelectorServer
public TThreadedSelectorServer(TThreadedSelectorServer.Args args)
- Create the server with the specified Args configuration
stop
public void stop()
- Stop serving and shut everything down.
- Overrides:
stop
in class TServer
Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.