Class ReplicationResult
java.lang.Object
org.frontcache.replication.ReplicationResult
Immutable snapshot of a replication run.
Captures the source/target URLs, counters for transferred/skipped/errored entries,
wall-clock duration, and a terminal status string. The console serialises this
to JSON for the /cache-replication/status polling endpoint.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringReplication was cancelled by the operator.static final StringReplication completed without errors.static final StringReplication completed but some entries failed.static final StringReplication failed (source or target unreachable).static final StringNo replication has been started.static final StringReplication is still running. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglonglongTotal entries processed so far (transferred + skipped + errors).doubleProgress fraction in [0, 1], or -1 if total is unknown.longEstimated entries remaining (-1 if totalSourceKeys is unknown).longlonglongbooleanTrue when the replication is no longer running (completed, cancelled, or failed).voidsetDurationMillis(long durationMillis) voidsetErrors(long errors) voidsetSkipped(long skipped) voidsetSourceUrl(String sourceUrl) voidvoidsetTargetUrl(String targetUrl) voidsetTotalSourceKeys(long totalSourceKeys) voidsetTransferred(long transferred) toString()
-
Field Details
-
STATUS_COMPLETED
-
STATUS_COMPLETED_WITH_ERRORS
Replication completed but some entries failed.- See Also:
-
STATUS_CANCELLED
-
STATUS_FAILED
Replication failed (source or target unreachable).- See Also:
-
STATUS_RUNNING
-
STATUS_IDLE
-
-
Constructor Details
-
ReplicationResult
public ReplicationResult() -
ReplicationResult
-
-
Method Details
-
getSourceUrl
-
setSourceUrl
-
getTargetUrl
-
setTargetUrl
-
getTotalSourceKeys
public long getTotalSourceKeys() -
setTotalSourceKeys
public void setTotalSourceKeys(long totalSourceKeys) -
getTransferred
public long getTransferred() -
setTransferred
public void setTransferred(long transferred) -
getSkipped
public long getSkipped() -
setSkipped
public void setSkipped(long skipped) -
getErrors
public long getErrors() -
setErrors
public void setErrors(long errors) -
getDurationMillis
public long getDurationMillis() -
setDurationMillis
public void setDurationMillis(long durationMillis) -
getStatus
-
setStatus
-
getProcessed
public long getProcessed()Total entries processed so far (transferred + skipped + errors). -
getRemaining
public long getRemaining()Estimated entries remaining (-1 if totalSourceKeys is unknown). -
getProgressFraction
public double getProgressFraction()Progress fraction in [0, 1], or -1 if total is unknown. -
isTerminal
public boolean isTerminal()True when the replication is no longer running (completed, cancelled, or failed). -
toString
-