public abstract class TDisruptorServer extends org.apache.thrift.server.TNonblockingServer implements TDisruptorServerMBean
| Modifier and Type | Class and Description |
|---|---|
protected class |
TDisruptorServer.AbstractSelectorThread |
protected class |
TDisruptorServer.AcceptorThread |
static class |
TDisruptorServer.Args |
class |
TDisruptorServer.InvocationHandler |
static class |
TDisruptorServer.RandomSelectorLoadBalancer |
static interface |
TDisruptorServer.SelectorLoadBalancer |
protected class |
TDisruptorServer.SelectorThread |
org.apache.thrift.server.TNonblockingServer.SelectAcceptThreadorg.apache.thrift.server.AbstractNonblockingServer.AbstractNonblockingServerArgs<T extends org.apache.thrift.server.AbstractNonblockingServer.AbstractNonblockingServerArgs<T>>, org.apache.thrift.server.AbstractNonblockingServer.AbstractSelectThread, org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer, org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer| Modifier and Type | Field and Description |
|---|---|
static String |
MBEAN_NAME |
| Constructor and Description |
|---|
TDisruptorServer(TDisruptorServer.Args args) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeClose(Message buffer)
Allows derived classes to react when a connection is closed.
|
protected abstract void |
beforeInvoke(Message message)
All implementations should use this method to provide custom behaviour in pre-invoke stage.
|
int |
getNumberOfSelectors() |
int |
getRingBufferSize() |
protected void |
gracefullyShutdownInvokerPool() |
boolean |
isHeapBasedAllocationUsed() |
boolean |
isStopped() |
protected void |
joinSelector() |
protected boolean |
requestInvoke(org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer frameBuffer) |
protected boolean |
startThreads() |
void |
stop() |
void |
useHeapBasedAllocation(boolean flag) |
protected void |
waitForShutdown() |
serve, startListening, stopListeningpublic static final String MBEAN_NAME
public TDisruptorServer(TDisruptorServer.Args args)
protected boolean startThreads()
startThreads in class org.apache.thrift.server.TNonblockingServerprotected void waitForShutdown()
waitForShutdown in class org.apache.thrift.server.TNonblockingServerprotected void joinSelector()
joinSelector in class org.apache.thrift.server.TNonblockingServerprotected void gracefullyShutdownInvokerPool()
public void stop()
stop in class org.apache.thrift.server.TNonblockingServerpublic boolean isStopped()
isStopped in class org.apache.thrift.server.TNonblockingServerprotected boolean requestInvoke(org.apache.thrift.server.AbstractNonblockingServer.FrameBuffer frameBuffer)
requestInvoke in class org.apache.thrift.server.TNonblockingServerprotected abstract void beforeInvoke(Message message)
message - The "message" or buffer associated with request in pre-invoke state.protected void beforeClose(Message buffer)
public int getRingBufferSize()
getRingBufferSize in interface TDisruptorServerMBeanpublic int getNumberOfSelectors()
getNumberOfSelectors in interface TDisruptorServerMBeanpublic boolean isHeapBasedAllocationUsed()
isHeapBasedAllocationUsed in interface TDisruptorServerMBeanpublic void useHeapBasedAllocation(boolean flag)
useHeapBasedAllocation in interface TDisruptorServerMBeanCopyright © 2013-2014. All Rights Reserved.