Package org.apache.hadoop.ipc
Interface RpcScheduler
- All Known Implementing Classes:
DecayRpcScheduler,DefaultRpcScheduler
public interface RpcScheduler
Implement this interface to be used for RPC scheduling and backoff.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddResponseTime(String name, int priorityLevel, int queueTime, int processingTime) Deprecated.default voidaddResponseTime(String callName, Schedulable schedulable, ProcessingDetails details) Store a processing time value for an RPC call into this scheduler.intbooleanshouldBackOff(Schedulable obj) voidstop()
-
Method Details
-
getPriorityLevel
- Parameters:
obj- input obj.- Returns:
- Returns priority level greater than zero as a hint for scheduling.
-
shouldBackOff
-
addResponseTime
@Deprecated default void addResponseTime(String name, int priorityLevel, int queueTime, int processingTime) Deprecated.This method only exists to maintain backwards compatibility with old implementations. It will not be called by any Hadoop code, and should not be implemented by new implementations.- Parameters:
name- input name.priorityLevel- input priorityLevel.queueTime- input queueTime.processingTime- input processingTime.- Throws:
UnsupportedOperationException- the requested operation is not supported.
-
addResponseTime
Store a processing time value for an RPC call into this scheduler.- Parameters:
callName- The name of the call.schedulable- The schedulable representing the incoming call.details- The details of processing time.
-
stop
void stop()
-
addResponseTime(String, Schedulable, ProcessingDetails)instead.