com.jalios.jstore
Class StampManager

java.lang.Object
  extended by com.jalios.jstore.StampManager
Direct Known Subclasses:
LogicalStampManager, TemporalStampManager

public abstract class StampManager
extends Object

This interface must be implemented by classes providing stamps.

Version:
$Revision: 16792 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Constructor Summary
StampManager(String urid, long logicalTime)
          Creates a new StampManager
 
Method Summary
 Stamp getProgressStamp(String urid)
          Returns the greatest stamp for a given urid.
 StampTable getProgressTable()
          Returns the map of greatest stamp
abstract  Stamp getStamp()
          Return a new stamp.
 String getUrid()
          Get the value of urid.
 void setUrid(String v)
          Set the value of urid.
 void update(Stamp stamp, boolean updatePT)
          Updates the clock and the progressTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

StampManager

public StampManager(String urid,
                    long logicalTime)
Creates a new StampManager

Parameters:
urid - Unique Replica IDentifier
logicalTime - the starting logical time
Method Detail

getProgressTable

public StampTable getProgressTable()
Returns the map of greatest stamp

Returns:
a Stamp
Since:
jcms-4.1

getProgressStamp

public Stamp getProgressStamp(String urid)
Returns the greatest stamp for a given urid.

Parameters:
urid - the urid
Returns:
a Stamp

getStamp

public abstract Stamp getStamp()
Return a new stamp. Ensures their strict monotonicity.

Returns:
a new stamp

update

public void update(Stamp stamp,
                   boolean updatePT)
Updates the clock and the progressTable

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

getUrid

public String getUrid()
Get the value of urid.

Returns:
Value of urid.

setUrid

public void setUrid(String v)
Set the value of urid.

Parameters:
v - Value to assign to urid.


Copyright © 2001-2010 Jalios SA. All Rights Reserved.