Class BayeuxClient.BackOffStrategy.Linear
java.lang.Object
org.cometd.client.BayeuxClient.BackOffStrategy.Linear
- All Implemented Interfaces:
BayeuxClient.BackOffStrategy
- Enclosing interface:
BayeuxClient.BackOffStrategy
public static class BayeuxClient.BackOffStrategy.Linear
extends Object
implements BayeuxClient.BackOffStrategy
A strategy that increases the wait time linearly up to a maximum.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cometd.client.BayeuxClient.BackOffStrategy
BayeuxClient.BackOffStrategy.Constant, BayeuxClient.BackOffStrategy.Linear
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Linear
public Linear() -
Linear
public Linear(long increment, long maximum)
-
-
Method Details
-
current
public long current()- Specified by:
current
in interfaceBayeuxClient.BackOffStrategy
- Returns:
- the current wait time
- See Also:
-
next
public long next()- Specified by:
next
in interfaceBayeuxClient.BackOffStrategy
- Returns:
- the next wait time
- See Also:
-
reset
public void reset()Description copied from interface:BayeuxClient.BackOffStrategy
Resets the wait time.- Specified by:
reset
in interfaceBayeuxClient.BackOffStrategy
-