|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.merge.v0_6.BaseReplicationDownloader
org.openstreetmap.osmosis.core.merge.v0_6.ReplicationFileMerger
public class ReplicationFileMerger
Consumes the files in a replication directory and combines them into larger replication files grouped by a time interval. This allows replication files created at regular intervals to be combined into larger files for more efficient consumption where latency is less of an issue.
Constructor Summary | |
---|---|
ReplicationFileMerger(java.io.File workingDirectory)
Creates a new instance. |
Method Summary | |
---|---|
protected java.util.Date |
calculateMaximumTimestamp(ReplicationDownloaderConfiguration configuration,
java.util.Date serverTimestamp,
java.util.Date localTimestamp)
Determines the maximum timestamp of data to be downloaded during this invocation. |
protected void |
processChangeset(XmlChangeReader xmlReader,
ReplicationState replicationState)
Processes the changeset. |
protected void |
processComplete()
This is implemented by sub-classes and is called when all changesets have been processed. |
protected void |
processInitialize(ReplicationState initialState)
Invoked once during the first execution run to allow initialisation based on the initial replication state downloaded from the server. |
protected void |
processRelease()
This is implemented by sub-classes and is called and the completion of all processing regardless of whether it was successful or not. |
Methods inherited from class org.openstreetmap.osmosis.core.merge.v0_6.BaseReplicationDownloader |
---|
getWorkingDirectory, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReplicationFileMerger(java.io.File workingDirectory)
workingDirectory
- The directory containing configuration and tracking files.Method Detail |
---|
protected java.util.Date calculateMaximumTimestamp(ReplicationDownloaderConfiguration configuration, java.util.Date serverTimestamp, java.util.Date localTimestamp)
calculateMaximumTimestamp
in class BaseReplicationDownloader
configuration
- The configuration.serverTimestamp
- The timestamp of the latest data on the server.localTimestamp
- The timestamp of the most recently downloaded data.
protected void processInitialize(ReplicationState initialState)
processInitialize
in class BaseReplicationDownloader
initialState
- The first server state.protected void processChangeset(XmlChangeReader xmlReader, ReplicationState replicationState)
processChangeset
in class BaseReplicationDownloader
xmlReader
- The changeset reader initialised to point to the changeset file.replicationState
- The replication state associated with the changeset file.protected void processComplete()
processComplete
in class BaseReplicationDownloader
protected void processRelease()
processRelease
in class BaseReplicationDownloader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |