org.apache.hadoop.hbase.ipc
Class RpcExecutor
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcExecutor
- Direct Known Subclasses:
- BalancedQueueRpcExecutor, RWQueueRpcExecutor
@InterfaceAudience.Private
@InterfaceStability.Evolving
public abstract class RpcExecutor
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RpcExecutor
public RpcExecutor(String name,
int handlerCount)
RpcExecutor
public RpcExecutor(String name,
int handlerCount,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable)
start
public void start(int port)
stop
public void stop()
getActiveHandlerCount
public int getActiveHandlerCount()
getQueueLength
public abstract int getQueueLength()
- Returns the length of the pending queue
dispatch
public abstract void dispatch(CallRunner callTask)
throws InterruptedException
- Add the request to the executor queue
- Throws:
InterruptedException
getQueues
protected abstract List<BlockingQueue<CallRunner>> getQueues()
- Returns the list of request queues
startHandlers
protected void startHandlers(int port)
startHandlers
protected void startHandlers(String nameSuffix,
int numHandlers,
List<BlockingQueue<CallRunner>> callQueues,
int qindex,
int qsize,
int port)
consumerLoop
protected void consumerLoop(BlockingQueue<CallRunner> myQueue)
getBalancer
public static RpcExecutor.QueueBalancer getBalancer(int queueSize)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.