org.apache.hadoop.hbase.ipc
Class RpcExecutor

java.lang.Object
  extended by org.apache.hadoop.hbase.ipc.RpcExecutor
Direct Known Subclasses:
BalancedQueueRpcExecutor, RWQueueRpcExecutor

@InterfaceAudience.Private
@InterfaceStability.Evolving
public abstract class RpcExecutor
extends Object


Nested Class Summary
static class RpcExecutor.QueueBalancer
           
 
Constructor Summary
RpcExecutor(String name, int handlerCount)
           
RpcExecutor(String name, int handlerCount, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
           
 
Method Summary
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcExecutor

public RpcExecutor(String name,
                   int handlerCount)

RpcExecutor

public RpcExecutor(String name,
                   int handlerCount,
                   org.apache.hadoop.conf.Configuration conf,
                   Abortable abortable)
Method Detail

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 © 2015 The Apache Software Foundation. All rights reserved.