org.openstreetmap.osmosis.extract.apidb.common
Class TimestampTracker

java.lang.Object
  extended by org.openstreetmap.osmosis.extract.apidb.common.TimestampTracker

public class TimestampTracker
extends java.lang.Object

Maintains the time that the extraction process has reached. It persists the time across invocations using a file.

Author:
Brett Henderson

Constructor Summary
TimestampTracker(java.io.File timestampFile, java.io.File newTimestampFile)
          Creates a new instance.
 
Method Summary
 java.util.Date getTime()
          Retrieve the current time.
 void setTime(java.util.Date time)
          Update the stored time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampTracker

public TimestampTracker(java.io.File timestampFile,
                        java.io.File newTimestampFile)
Creates a new instance.

Parameters:
timestampFile - The location of the file containing the persisted timestamp.
newTimestampFile - The location of the temp file to use when updating the persisted timestamp to make the update atomic.
Method Detail

getTime

public java.util.Date getTime()
Retrieve the current time.

Returns:
The time.

setTime

public void setTime(java.util.Date time)
Update the stored time.

Parameters:
time - The time to set.