Class ReplicaSnapshot


  • public class ReplicaSnapshot
    extends java.lang.Object
    A snapshot of a replica.
    See Also:
    LeaderSnapshot
    • Constructor Detail

    • Method Detail

      • getReplica

        public KetchReplica getReplica()
        Get the replica this snapshot describes the state of
        Returns:
        the replica this snapshot describes the state of
      • getState

        public KetchReplica.State getState()
        Get current state of the replica
        Returns:
        current state of the replica
      • getAccepted

        @Nullable
        public ObjectId getAccepted()
        Get last known Git commit at refs/txn/accepted
        Returns:
        last known Git commit at refs/txn/accepted
      • getCommitted

        @Nullable
        public ObjectId getCommitted()
        Get last known Git commit at refs/txn/committed
        Returns:
        last known Git commit at refs/txn/committed
      • getErrorMessage

        @Nullable
        public java.lang.String getErrorMessage()
        Get error message
        Returns:
        if getState() == KetchReplica.State.OFFLINE an optional human-readable message from the transport system explaining the failure.
      • getRetryAt

        @Nullable
        public java.util.Date getRetryAt()
        Get when the leader will retry communication with the offline or lagging replica
        Returns:
        time (usually in the future) when the leader will retry communication with the offline or lagging replica; null if no retry is scheduled or necessary.