|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openstreetmap.osmosis.core.apidb.v0_6.impl.ReplicationState
public class ReplicationState
Contains the state to be remembered between replication invocations. This state ensures that no data is missed during replication, and none is repeated.
| Constructor Summary | |
|---|---|
ReplicationState(long txnMax,
long txnMaxQueried,
java.util.List<java.lang.Long> txnActive,
java.util.List<java.lang.Long> txnReady,
java.util.Date timestamp,
long sequenceNumber)
Creates a new instance. |
|
ReplicationState(java.util.Properties properties)
Creates a new instance. |
|
ReplicationState(StoreReader reader,
StoreClassRegister scr)
Creates a new instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
long |
getSequenceNumber()
Gets the replication sequence number. |
java.util.Date |
getTimestamp()
Gets the maximum timestamp of data currently read from the database. |
java.util.List<java.lang.Long> |
getTxnActive()
Gets the currently active transaction ids. |
long |
getTxnMax()
Gets the maximum transaction id in the database. |
long |
getTxnMaxQueried()
Gets the maximum transaction id currently replicated from the database. |
java.util.List<java.lang.Long> |
getTxnReady()
Gets the previously active transaction ids that can now be queried. |
int |
hashCode()
|
void |
setSequenceNumber(long sequenceNumber)
Sets the replication sequence number. |
void |
setTimestamp(java.util.Date timestamp)
Sets the maximum timestamp of data currently read from the database. |
void |
setTxnMax(long txnMax)
Sets the maximum transaction id in the database. |
void |
setTxnMaxQueried(long txnMaxQueried)
Sets the maximum transaction id currently replicated from the database. |
void |
store(java.util.Properties properties)
Writes all state into the provided properties object. |
void |
store(StoreWriter writer,
StoreClassRegister storeClassRegister)
Stores all state to the specified store writer. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicationState(long txnMax,
long txnMaxQueried,
java.util.List<java.lang.Long> txnActive,
java.util.List<java.lang.Long> txnReady,
java.util.Date timestamp,
long sequenceNumber)
txnMax - The maximum transaction id in the database.txnMaxQueried - The maximum transaction id currently replicated from the database.txnActive - The currently active transaction ids.txnReady - The previously active transaction ids that can now be queried.timestamp - The maximum timestamp of data currently read from the database.sequenceNumber - The replication sequence number.
public ReplicationState(StoreReader reader,
StoreClassRegister scr)
reader - The store to read state from.scr - Maintains the mapping between classes and their identifiers
within the store.public ReplicationState(java.util.Properties properties)
properties - The properties to load state from.| Method Detail |
|---|
public void store(StoreWriter writer,
StoreClassRegister storeClassRegister)
store in interface Storeablewriter - The writer that persists data to an underlying store.storeClassRegister - Maintains the mapping between classes and their identifiers
within the store.public void store(java.util.Properties properties)
properties - The properties to be updated.public long getTxnMax()
public void setTxnMax(long txnMax)
txnMax - The transaction id.public long getTxnMaxQueried()
public void setTxnMaxQueried(long txnMaxQueried)
txnMaxQueried - The transaction id.public java.util.List<java.lang.Long> getTxnActive()
public java.util.List<java.lang.Long> getTxnReady()
public java.util.Date getTimestamp()
public void setTimestamp(java.util.Date timestamp)
timestamp - The timestamp.public long getSequenceNumber()
public void setSequenceNumber(long sequenceNumber)
sequenceNumber - The sequence number.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||