Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TwinTracker

        public TwinTracker​(byte[] obj)
      • TwinTracker

        public TwinTracker​(byte[] obj,
                           int version,
                           java.lang.String sessionId)
    • Method Detail

      • getVersion

        public int getVersion()
      • getObj

        public byte[] getObj()
      • getSessionId

        public java.lang.String getSessionId()
      • update

        public int update​(byte[] obj)