@InterfaceAudience.Private @InterfaceStability.Evolving public abstract class RpcExecutor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RpcExecutor.QueueBalancer |
Constructor and Description |
---|
RpcExecutor(String name,
int handlerCount) |
RpcExecutor(String name,
int handlerCount,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
protected void |
consumerLoop(BlockingQueue<CallRunner> myQueue) |
abstract void |
dispatch(CallRunner callTask)
Add the request to the executor queue
|
int |
getActiveHandlerCount() |
static RpcExecutor.QueueBalancer |
getBalancer(int queueSize) |
abstract int |
getQueueLength()
Returns the length of the pending queue
|
protected abstract List<BlockingQueue<CallRunner>> |
getQueues()
Returns the list of request queues
|
void |
start(int port) |
protected void |
startHandlers(int port) |
protected void |
startHandlers(String nameSuffix,
int numHandlers,
List<BlockingQueue<CallRunner>> callQueues,
int qindex,
int qsize,
int port) |
void |
stop() |
public RpcExecutor(String name, int handlerCount)
public void start(int port)
public void stop()
public int getActiveHandlerCount()
public abstract int getQueueLength()
public abstract void dispatch(CallRunner callTask) throws InterruptedException
InterruptedException
protected abstract List<BlockingQueue<CallRunner>> getQueues()
protected void startHandlers(int port)
protected void startHandlers(String nameSuffix, int numHandlers, List<BlockingQueue<CallRunner>> callQueues, int qindex, int qsize, int port)
protected void consumerLoop(BlockingQueue<CallRunner> myQueue)
public static RpcExecutor.QueueBalancer getBalancer(int queueSize)
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.