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:
- Haakon Dybdahl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether or not the given message can be sent according to the current state of this policy.voidprocessMessage(Message msg) This method is called once for every message that was accepted byThrottlePolicy.canSend(Message, int)and sent.voidprocessReply(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:ThrottlePolicyReturns whether or not the given message can be sent according to the current state of this policy.- Specified by:
canSendin interfaceThrottlePolicy- Parameters:
msg- the message to evaluatependingCount- the current number of pending messages- Returns:
- true to send the message
-
processMessage
Description copied from interface:ThrottlePolicyThis method is called once for every message that was accepted byThrottlePolicy.canSend(Message, int)and sent.- Specified by:
processMessagein interfaceThrottlePolicy- Parameters:
msg- the message being sent
-
processReply
Description copied from interface:ThrottlePolicyThis method is called once for every reply that is received.- Specified by:
processReplyin interfaceThrottlePolicy- Parameters:
reply- the reply received
-