@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface RpcScheduler
Modifier and Type | Interface and Description |
---|---|
static interface |
RpcScheduler.Context
Exposes runtime information of a
RpcServer that a RpcScheduler may need. |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(CallRunner task)
Dispatches an RPC request asynchronously.
|
int |
getGeneralQueueLength()
Retrieves length of the general queue for metrics.
|
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.
|
void init(RpcScheduler.Context context)
start()
. This method is called before start
.context
- provides methods to retrieve runtime information fromvoid start()
void stop()
void dispatch(CallRunner task) throws IOException, InterruptedException
task
- the request to be dispatchedIOException
InterruptedException
int getGeneralQueueLength()
int getPriorityQueueLength()
int getReplicationQueueLength()
Copyright © 2014 The Apache Software Foundation. All rights reserved.