Package com.jalios.jstore
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 Summary
Constructors Constructor Description TemporalStampManager(java.lang.String urid)Creates a new StampManagerTemporalStampManager(java.lang.String urid, long logicalTime)Creates a new StampManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StampgetStamp()Return a new stamp.voidsetGranularity(long granularity)Set the logical clock time granularityvoidupdate(Stamp stamp, boolean updatePT)Updates the clock-
Methods inherited from class com.jalios.jstore.StampManager
getProgressStamp, getProgressTable, getUrid, setUrid
-
-
-
-
Constructor Detail
-
TemporalStampManager
public TemporalStampManager(java.lang.String urid, long logicalTime)Creates a new StampManager- Parameters:
urid- Unique Replica IDentifierlogicalTime- the starting logical time
-
TemporalStampManager
public TemporalStampManager(java.lang.String urid)
Creates a new StampManager- Parameters:
urid- Unique Replica IDentifier
-
-
Method Detail
-
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:
getStampin classStampManager- Returns:
- a new stamp
-
update
public void update(Stamp stamp, boolean updatePT)
Updates the clock- Overrides:
updatein classStampManager- Parameters:
stamp- the stamp containing the new time (MUST BE greaterupdatePT- if true use this stamp to update the progress table than the current time, otherwise it is ignored)- Since:
- jcms-5.0.6
-
-