Interface ThrottlePolicy

    • Method Detail

      • canSend

        boolean canSend​(Message message,
                        int pendingCount)
        Returns whether or not the given message can be sent according to the current state of this policy.
        Parameters:
        message - the message to evaluate
        pendingCount - the current number of pending messages
        Returns:
        true to send the message
      • processMessage

        void processMessage​(Message message)
        This method is called once for every message that was accepted by canSend(Message, int) and sent.
        Parameters:
        message - the message being sent
      • processReply

        void processReply​(Reply reply)
        This method is called once for every reply that is received.
        Parameters:
        reply - the reply received