Package org.opennms.core.ipc.twin.common
Class TwinTracker
- java.lang.Object
-
- org.opennms.core.ipc.twin.common.TwinTracker
-
public class TwinTracker extends java.lang.Object
This Tracks Twin Object Updates for a given SessionKey (key, location). Twin Tracker consists of marshalled object( byte[]), version and sessionId. Version is incremented whenever object updates. sessionId is created only once per a SessionKey. TwinTracker is created and updated by publisher and only consumed by Subscriber. Subscriber will ignore any stale updates based on version but resets version whenever there is new SessionId.
-
-
Constructor Summary
Constructors Constructor Description TwinTracker(byte[] obj)
TwinTracker(byte[] obj, int version, java.lang.String sessionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getObj()
java.lang.String
getSessionId()
int
getVersion()
int
update(byte[] obj)
-