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