Package com.yahoo.messagebus
Class AllPassThrottlePolicy
java.lang.Object
com.yahoo.messagebus.AllPassThrottlePolicy
- All Implemented Interfaces:
ThrottlePolicy
This is an implementation of the
ThrottlePolicy
that passes all requests (no real throttling).- Author:
- dybis
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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 byThrottlePolicy.canSend(Message, int)
and sent.void
processReply
(Reply reply) This method is called once for every reply that is received.
-
Constructor Details
-
AllPassThrottlePolicy
public AllPassThrottlePolicy()
-
-
Method Details
-
canSend
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 interfaceThrottlePolicy
- Parameters:
msg
- the message to evaluatependingCount
- the current number of pending messages- Returns:
- true to send the message
-
processMessage
Description copied from interface:ThrottlePolicy
This method is called once for every message that was accepted byThrottlePolicy.canSend(Message, int)
and sent.- Specified by:
processMessage
in interfaceThrottlePolicy
- Parameters:
msg
- the message being sent
-
processReply
Description copied from interface:ThrottlePolicy
This method is called once for every reply that is received.- Specified by:
processReply
in interfaceThrottlePolicy
- Parameters:
reply
- the reply received
-