Class TemporalStampManager

java.lang.Object
com.jalios.jstore.StampManager
com.jalios.jstore.TemporalStampManager

public class TemporalStampManager extends StampManager
This class provides pseudo-temporal stamps.
Author:
Olivier Dedieu
  • Constructor Details

    • TemporalStampManager

      public TemporalStampManager(String urid, long logicalTime)
      Creates a new StampManager
      Parameters:
      urid - Unique Replica IDentifier
      logicalTime - the starting logical time
    • TemporalStampManager

      public TemporalStampManager(String urid)
      Creates a new StampManager
      Parameters:
      urid - Unique Replica IDentifier
  • Method Details

    • setGranularity

      public void setGranularity(long granularity)
      Set the logical clock time granularity
      Parameters:
      granularity - - the granularity in millisecs
    • getStamp

      public Stamp getStamp()
      Return a new stamp. Ensures their strict monotonicity.
      Specified by:
      getStamp in class StampManager
      Returns:
      a new stamp
    • update

      public void update(Stamp stamp, boolean updatePT)
      Updates the clock
      Overrides:
      update in class StampManager
      Parameters:
      stamp - the stamp containing the new time (MUST BE greater
      updatePT - if true use this stamp to update the progress table than the current time, otherwise it is ignored)
      Since:
      jcms-5.0.6