Package org.activecomponents.udp
Class IdReplayTracker
- java.lang.Object
-
- org.activecomponents.udp.IdReplayTracker
-
public class IdReplayTracker extends java.lang.ObjectClass for monitoring incoming IDs and identifying replays.
-
-
Field Summary
Fields Modifier and Type Field Description protected longidlowerboundID lower bound, no ID is valid at or below this value.protected intidtimeoutTimeout for missing IDs.protected longidupperboundID upper bound, the highest ID checked.protected java.util.Map<java.lang.Long,java.lang.Long>missingIdsIDs not checked yet between upper and lower bound.protected longnextidcleanupTimestamp 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 booleanisReplay(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.
-
-