Interface RpcScheduler

All Known Implementing Classes:
DecayRpcScheduler, DefaultRpcScheduler

public interface RpcScheduler
Implement this interface to be used for RPC scheduling and backoff.
  • Method Details

    • getPriorityLevel

      int getPriorityLevel(Schedulable obj)
      Parameters:
      obj - input obj.
      Returns:
      Returns priority level greater than zero as a hint for scheduling.
    • shouldBackOff

      boolean shouldBackOff(Schedulable obj)
    • addResponseTime

      @Deprecated default void addResponseTime(String name, int priorityLevel, int queueTime, int processingTime)
      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

      default void addResponseTime(String callName, Schedulable schedulable, ProcessingDetails details)
      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()