Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // This software is released into the Public Domain.  See copying.txt for details.
 package org.openstreetmap.osmosis.replication.common;
 
Defines a store for replication data.

Author(s):
Brett Henderson
public interface ReplicationStore {
Gets the current replication state. This corresponds to the state of the latest sequence in the store.

Returns:
The replication state.
Gets the state for the specified sequence.

Parameters:
sequence The sequence to be loaded.
Returns:
The replication state.
	ReplicationState getState(long sequence);


Gets the data for the specified sequence.

Parameters:
sequence The sequence to be loaded.
Returns:
The change reader.
	XmlChangeReader getData(long sequence);


Sets the state for the specified sequence. The current state may be updated to match depending on the store configuration. This should only be called after data has been successfully written.

Parameters:
state The replication state.
	void saveState(ReplicationState state);


Obtains an change writer used to save the replication data for the specified sequence.

Parameters:
sequence The sequence to be saved.
Returns:
The change writer.
	XmlChangeWriter saveData(long sequence);
New to GrepCode? Check out our FAQ X