public class DefaultReplayStrategy extends Object implements ReplayStrategy
| Constructor and Description |
|---|
DefaultReplayStrategy() |
DefaultReplayStrategy(int maximumDifference) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaximumDifference() |
boolean |
onDroppedPackets(ReliableTransport transport,
int expectedCounter,
int actualCounter,
int nextAvailableCounter)
Deals with a dropped packet.
|
void |
onReceivedPacket(ReliableTransport transport,
long expectedCounter) |
void |
setMaximumDifference(int maximumDifference)
Sets the maximum allowed difference between an expected packet and an
actual packet before an error occurs
|
public DefaultReplayStrategy()
public DefaultReplayStrategy(int maximumDifference)
public boolean onDroppedPackets(ReliableTransport transport, int expectedCounter, int actualCounter, int nextAvailableCounter) throws IOException
ReplayStrategyonDroppedPackets in interface ReplayStrategytransport - the transport on which the packet was droppedexpectedCounter - the expected command counteractualCounter - the actual command counternextAvailableCounter - TODOIOExceptionpublic void onReceivedPacket(ReliableTransport transport, long expectedCounter)
onReceivedPacket in interface ReplayStrategypublic int getMaximumDifference()
public void setMaximumDifference(int maximumDifference)
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.