Class AllPassThrottlePolicy

  • All Implemented Interfaces:
    ThrottlePolicy

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canSend​(Message msg, int pendingCount)
      Returns whether or not the given message can be sent according to the current state of this policy.
      void processMessage​(Message msg)
      This method is called once for every message that was accepted by ThrottlePolicy.canSend(Message, int) and sent.
      void processReply​(Reply reply)
      This method is called once for every reply that is received.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AllPassThrottlePolicy

        public AllPassThrottlePolicy()
    • Method Detail

      • 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
      • 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