Package org.activecomponents.udp
Class IdReplayTracker
- java.lang.Object
-
- org.activecomponents.udp.IdReplayTracker
-
public class IdReplayTracker extends java.lang.Object
Class for monitoring incoming IDs and identifying replays.
-
-
Field Summary
Fields Modifier and Type Field Description protected long
idlowerbound
ID lower bound, no ID is valid at or below this value.protected int
idtimeout
Timeout for missing IDs.protected long
idupperbound
ID upper bound, the highest ID checked.protected java.util.Map<java.lang.Long,java.lang.Long>
missingIds
IDs not checked yet between upper and lower bound.protected long
nextidcleanup
Timestamp for the next cleanup of the missing ID map.
-
Constructor Summary
Constructors Constructor Description IdReplayTracker()
IdReplayTracker(long startid, int idtimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isReplay(long id)
Checks if an ID is a replay value, otherwise registers it.
-
-
-
Field Detail
-
idlowerbound
protected long idlowerbound
ID lower bound, no ID is valid at or below this value.
-
idupperbound
protected long idupperbound
ID upper bound, the highest ID checked.
-
nextidcleanup
protected long nextidcleanup
Timestamp for the next cleanup of the missing ID map.
-
idtimeout
protected int idtimeout
Timeout for missing IDs.
-
missingIds
protected java.util.Map<java.lang.Long,java.lang.Long> missingIds
IDs not checked yet between upper and lower bound. Missing ID -> Timestamp of last packet.
-
-