@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) @InterfaceStability.Evolving public class BalancedQueueRpcExecutor extends RpcExecutor
RpcExecutor that will balance requests evenly across all its queues, but still remains
 efficient with a single queue via an inlinable queue balancing mechanism.| Modifier and Type | Field and Description | 
|---|---|
protected List<BlockingQueue<CallRunner>> | 
queues  | 
| Constructor and Description | 
|---|
BalancedQueueRpcExecutor(String name,
                        int handlerCount,
                        int numQueues,
                        Class<? extends BlockingQueue> queueClass,
                        Object... initargs)  | 
BalancedQueueRpcExecutor(String name,
                        int handlerCount,
                        int numQueues,
                        int maxQueueLength)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
dispatch(CallRunner callTask)
Add the request to the executor queue 
 | 
static org.apache.hadoop.hbase.ipc.BalancedQueueRpcExecutor.QueueBalancer | 
getBalancer(int queueSize)  | 
int | 
getQueueLength()
Returns the length of the pending queue 
 | 
List<BlockingQueue<CallRunner>> | 
getQueues()
Returns the list of request queues 
 | 
protected void | 
initializeQueues(int numQueues,
                Class<? extends BlockingQueue> queueClass,
                Object... initargs)  | 
consumerLoop, getActiveHandlerCount, start, startHandlers, startHandlers, stopprotected final List<BlockingQueue<CallRunner>> queues
public BalancedQueueRpcExecutor(String name, int handlerCount, int numQueues, int maxQueueLength)
public BalancedQueueRpcExecutor(String name, int handlerCount, int numQueues, Class<? extends BlockingQueue> queueClass, Object... initargs)
protected void initializeQueues(int numQueues,
                    Class<? extends BlockingQueue> queueClass,
                    Object... initargs)
public void dispatch(CallRunner callTask) throws InterruptedException
RpcExecutordispatch in class RpcExecutorInterruptedExceptionpublic int getQueueLength()
RpcExecutorgetQueueLength in class RpcExecutorpublic List<BlockingQueue<CallRunner>> getQueues()
RpcExecutorgetQueues in class RpcExecutorpublic static org.apache.hadoop.hbase.ipc.BalancedQueueRpcExecutor.QueueBalancer getBalancer(int queueSize)
Copyright © 2014 The Apache Software Foundation. All rights reserved.