Class AllPassThrottlePolicy

java.lang.Object
com.yahoo.messagebus.AllPassThrottlePolicy
All Implemented Interfaces:
ThrottlePolicy

public class AllPassThrottlePolicy extends Object implements ThrottlePolicy
This is an implementation of the ThrottlePolicy that passes all requests (no real throttling).
Author:
dybis
  • Constructor Details

    • AllPassThrottlePolicy

      public AllPassThrottlePolicy()
  • Method Details

    • canSend

      public boolean canSend(Message msg, int pendingCount)
      Description copied from interface: ThrottlePolicy
      Returns whether or not the given message can be sent according to the current state of this policy.
      Specified by:
      canSend in interface ThrottlePolicy
      Parameters:
      msg - the message to evaluate
      pendingCount - the current number of pending messages
      Returns:
      true to send the message
    • processMessage

      public void processMessage(Message msg)
      Description copied from interface: ThrottlePolicy
      This method is called once for every message that was accepted by ThrottlePolicy.canSend(Message, int) and sent.
      Specified by:
      processMessage in interface ThrottlePolicy
      Parameters:
      msg - the message being sent
    • processReply

      public void processReply(Reply reply)
      Description copied from interface: ThrottlePolicy
      This method is called once for every reply that is received.
      Specified by:
      processReply in interface ThrottlePolicy
      Parameters:
      reply - the reply received