public class DelegatingRpcScheduler extends RpcScheduler
RpcScheduler.Context| Modifier and Type | Field and Description |
|---|---|
protected RpcScheduler |
delegate |
IPC_SERVER_MAX_CALLQUEUE_LENGTH, IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH| Constructor and Description |
|---|
DelegatingRpcScheduler(RpcScheduler delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dispatch(CallRunner task)
Dispatches an RPC request asynchronously.
|
int |
getActiveRpcHandlerCount()
Retrieves the number of active handler.
|
int |
getGeneralQueueLength()
Retrieves length of the general queue for metrics.
|
long |
getNumGeneralCallsDropped()
If CoDel-based RPC executors are used, retrieves the number of Calls that were dropped
from general queue because RPC executor is under high load; returns 0 otherwise.
|
long |
getNumLifoModeSwitches()
If CoDel-based RPC executors are used, retrieves the number of Calls that were
picked from the tail of the queue (indicating adaptive LIFO mode, when
in the period of overloade we serve last requests first); returns 0 otherwise.
|
int |
getPriorityQueueLength()
Retrieves length of the priority queue for metrics.
|
int |
getReplicationQueueLength()
Retrieves length of the replication queue for metrics.
|
void |
init(RpcScheduler.Context context)
Does some quick initialization.
|
void |
start()
Prepares for request serving.
|
void |
stop()
Stops serving new requests.
|
protected RpcScheduler delegate
public DelegatingRpcScheduler(RpcScheduler delegate)
public void stop()
RpcSchedulerstop in class RpcSchedulerpublic void start()
RpcSchedulerstart in class RpcSchedulerpublic void init(RpcScheduler.Context context)
RpcSchedulerRpcScheduler.start(). This method is called before start.init in class RpcSchedulercontext - provides methods to retrieve runtime information frompublic int getReplicationQueueLength()
RpcSchedulergetReplicationQueueLength in class RpcSchedulerpublic int getPriorityQueueLength()
RpcSchedulergetPriorityQueueLength in class RpcSchedulerpublic int getGeneralQueueLength()
RpcSchedulergetGeneralQueueLength in class RpcSchedulerpublic int getActiveRpcHandlerCount()
RpcSchedulergetActiveRpcHandlerCount in class RpcSchedulerpublic boolean dispatch(CallRunner task) throws IOException, InterruptedException
RpcSchedulerdispatch in class RpcSchedulertask - the request to be dispatchedIOExceptionInterruptedExceptionpublic long getNumGeneralCallsDropped()
RpcSchedulergetNumGeneralCallsDropped in class RpcSchedulerpublic long getNumLifoModeSwitches()
RpcSchedulergetNumLifoModeSwitches in class RpcScheduler