Class ReplicationResult

java.lang.Object
org.frontcache.replication.ReplicationResult

public class ReplicationResult extends Object
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 Details

    • STATUS_COMPLETED

      public static final String STATUS_COMPLETED
      Replication completed without errors.
      See Also:
    • STATUS_COMPLETED_WITH_ERRORS

      public static final String STATUS_COMPLETED_WITH_ERRORS
      Replication completed but some entries failed.
      See Also:
    • STATUS_CANCELLED

      public static final String STATUS_CANCELLED
      Replication was cancelled by the operator.
      See Also:
    • STATUS_FAILED

      public static final String STATUS_FAILED
      Replication failed (source or target unreachable).
      See Also:
    • STATUS_RUNNING

      public static final String STATUS_RUNNING
      Replication is still running.
      See Also:
    • STATUS_IDLE

      public static final String STATUS_IDLE
      No replication has been started.
      See Also:
  • Constructor Details

    • ReplicationResult

      public ReplicationResult()
    • ReplicationResult

      public ReplicationResult(String sourceUrl, String targetUrl)
  • Method Details

    • getSourceUrl

      public String getSourceUrl()
    • setSourceUrl

      public void setSourceUrl(String sourceUrl)
    • getTargetUrl

      public String getTargetUrl()
    • setTargetUrl

      public void setTargetUrl(String targetUrl)
    • 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

      public String getStatus()
    • setStatus

      public void setStatus(String status)
    • 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

      public String toString()
      Overrides:
      toString in class Object