org.ektorp.impl
Class StdReplicationTask
java.lang.Object
org.ektorp.impl.StdActiveTask
org.ektorp.impl.StdReplicationTask
- All Implemented Interfaces:
- ActiveTask, ReplicationTask
public class StdReplicationTask
- extends StdActiveTask
- implements ReplicationTask
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StdReplicationTask
public StdReplicationTask()
getReplicationId
public String getReplicationId()
- Specified by:
getReplicationId in interface ReplicationTask
- Returns:
- a unique ID for this replication task which can be used e.g. to cancel an ongoing
replication (see http://wiki.apache.org/couchdb/Replication#from_1.2.0_onward)
setReplicationId
public void setReplicationId(String replicationId)
getReplicationDocumentId
public String getReplicationDocumentId()
- Specified by:
getReplicationDocumentId in interface ReplicationTask
- Returns:
- the ID of the document which defines the replication rule being processed by this task
setReplicationDocumentId
public void setReplicationDocumentId(String replicationDocumentId)
isContinuous
public boolean isContinuous()
- Specified by:
isContinuous in interface ReplicationTask
- Returns:
- a boolean indicating whether or not the replication rule being processed is continuous
setContinuous
public void setContinuous(boolean isContinuous)
getWriteFailures
public long getWriteFailures()
- Specified by:
getWriteFailures in interface ReplicationTask
- Returns:
- the total number of document writes which have failed so far in this task
setWriteFailures
public void setWriteFailures(long writeFailures)
getTotalReads
public long getTotalReads()
- Specified by:
getTotalReads in interface ReplicationTask
- Returns:
- the total number of document reads so far for this task
setTotalReads
public void setTotalReads(long totalReads)
getTotalWrites
public long getTotalWrites()
- Specified by:
getTotalWrites in interface ReplicationTask
- Returns:
- the total number of successful document writes so far for this task
setTotalWrites
public void setTotalWrites(long totalWrites)
getTotalMissingRevisions
public long getTotalMissingRevisions()
- Specified by:
getTotalMissingRevisions in interface ReplicationTask
- Returns:
- the number of documents in the target DB which have been found to be either missing or out of date. This
number can be incremented more than once for the same document: for example if a document is updated while a
continuous replication rule is active. It won't however be increased by more than 1 if a document is out of
date by more than one revision: for example if document X is at revision 3 in Source and revision 1 in Target,
this number only increases by 1 when document X is checked.
setTotalMissingRevisions
public void setTotalMissingRevisions(long totalMissingRevisions)
getTotalRevisionsChecked
public long getTotalRevisionsChecked()
- Specified by:
getTotalRevisionsChecked in interface ReplicationTask
- Returns:
- the number of documents from the source DB whose presence and revision number in the target DB have been
checked. This number can be incremented more than once for the same document: for example if a document is
updated while a continuous replication rule is active, it will be checked again. It won't however count
multiple revisions of the same document each time it's checked: for example if a document is at revision 3 the
first time it's checked, this count will still only increase by 1.
setTotalRevisionsChecked
public void setTotalRevisionsChecked(long totalRevisionsChecked)
getSourceDatabaseName
public String getSourceDatabaseName()
- Specified by:
getSourceDatabaseName in interface ReplicationTask
- Returns:
- the name of the source database for this task
setSourceDatabase
public void setSourceDatabase(String sourceDatabase)
getTargetDatabaseName
public String getTargetDatabaseName()
- Specified by:
getTargetDatabaseName in interface ReplicationTask
- Returns:
- the name of the target database for this task
setTargetDatabase
public void setTargetDatabase(String targetDatabase)
getSourceSequenceId
public long getSourceSequenceId()
- Specified by:
getSourceSequenceId in interface ReplicationTask
- Returns:
- the sequence number of the source database
setSourceSequenceId
public void setSourceSequenceId(long sourceSequenceId)
getCheckpointedSourceSequenceId
public long getCheckpointedSourceSequenceId()
- Specified by:
getCheckpointedSourceSequenceId in interface ReplicationTask
- Returns:
- the latest sequence number of the source database which has been processed by this task
setCheckpointedSourceSequenceId
public void setCheckpointedSourceSequenceId(long checkpointedSourceSequenceId)
getCheckpointInterval
public Long getCheckpointInterval()
- Description copied from interface:
ReplicationTask
- Defines replication checkpoint interval in milliseconds. Replicator will requests from the Source database at the specified interval
- Specified by:
getCheckpointInterval in interface ReplicationTask
setCheckpointInterval
public void setCheckpointInterval(Long checkpointInterval)
Copyright © 2017. All rights reserved.