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.
        message - the message to evaluate
        pendingCount - the current number of pending messages
        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.
        message - the message being sent
      • processReply

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