org.openstreetmap.osmosis.core.apidb.v0_6.impl
Interface ReplicationStatePersister

All Known Subinterfaces:
ReplicationDestination
All Known Implementing Classes:
FileReplicationDestination, FileReplicationStatePersistor

public interface ReplicationStatePersister

Implementations of this interface provide persistence for replication state objects. This state should be persisted after completion of the data replication, and preferably within the same transaction to avoid duplicates in the face of failures.


Method Summary
 ReplicationState loadState()
          Loads the existing state.
 void saveState(ReplicationState state)
          Persists the state.
 boolean stateExists()
          Checks if state currently exists.
 

Method Detail

saveState

void saveState(ReplicationState state)
Persists the state.

Parameters:
state - The state to be persisted.

loadState

ReplicationState loadState()
Loads the existing state.

Returns:
The state to be loaded.

stateExists

boolean stateExists()
Checks if state currently exists. If no state exists it will need to be initialized.

Returns:
True if state exists, false otherwise.