@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. Defaults to FIFO but
 you can pass an alternate queue class to use.RpcExecutor.Handler, RpcExecutor.QueueBalancer| Modifier and Type | Field and Description | 
|---|---|
protected List<BlockingQueue<CallRunner>> | 
queues  | 
currentQueueLimit, DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT| Constructor and Description | 
|---|
BalancedQueueRpcExecutor(String name,
                        int handlerCount,
                        int numQueues,
                        Class<? extends BlockingQueue> queueClass,
                        Object... initargs)  | 
BalancedQueueRpcExecutor(String name,
                        int handlerCount,
                        int numQueues,
                        Configuration conf,
                        Abortable abortable,
                        Class<? extends BlockingQueue> queueClass,
                        Object... initargs)  | 
BalancedQueueRpcExecutor(String name,
                        int handlerCount,
                        int numQueues,
                        int maxQueueLength)  | 
BalancedQueueRpcExecutor(String name,
                        int handlerCount,
                        int numQueues,
                        int maxQueueLength,
                        Configuration conf,
                        Abortable abortable)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
dispatch(CallRunner callTask)
Add the request to the executor queue 
 | 
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)  | 
getActiveHandlerCount, getBalancer, getHandler, resizeQueues, 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, int maxQueueLength, Configuration conf, Abortable abortable)
public BalancedQueueRpcExecutor(String name, int handlerCount, int numQueues, Class<? extends BlockingQueue> queueClass, Object... initargs)
public BalancedQueueRpcExecutor(String name, int handlerCount, int numQueues, Configuration conf, Abortable abortable, Class<? extends BlockingQueue> queueClass, Object... initargs)
protected void initializeQueues(int numQueues,
                                Class<? extends BlockingQueue> queueClass,
                                Object... initargs)
public boolean dispatch(CallRunner callTask) throws InterruptedException
RpcExecutordispatch in class RpcExecutorInterruptedExceptionpublic int getQueueLength()
RpcExecutorgetQueueLength in class RpcExecutorpublic List<BlockingQueue<CallRunner>> getQueues()
RpcExecutorgetQueues in class RpcExecutor