Package org.eclipse.jgit.internal.ketch
Class ReplicaSnapshot
- java.lang.Object
-
- org.eclipse.jgit.internal.ketch.ReplicaSnapshot
-
public class ReplicaSnapshot extends java.lang.Object
A snapshot of a replica.- See Also:
LeaderSnapshot
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ObjectId
accepted
(package private) ObjectId
committed
(package private) java.lang.String
error
(package private) KetchReplica
replica
(package private) long
retryAtMillis
(package private) KetchReplica.State
state
-
Constructor Summary
Constructors Constructor Description ReplicaSnapshot(KetchReplica replica)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectId
getAccepted()
Get last known Git commit atrefs/txn/accepted
ObjectId
getCommitted()
Get last known Git commit atrefs/txn/committed
java.lang.String
getErrorMessage()
Get error messageKetchReplica
getReplica()
Get the replica this snapshot describes the state ofjava.util.Date
getRetryAt()
Get when the leader will retry communication with the offline or lagging replicaKetchReplica.State
getState()
Get current state of the replica
-
-
-
Field Detail
-
replica
final KetchReplica replica
-
accepted
ObjectId accepted
-
committed
ObjectId committed
-
state
KetchReplica.State state
-
error
java.lang.String error
-
retryAtMillis
long retryAtMillis
-
-
Constructor Detail
-
ReplicaSnapshot
ReplicaSnapshot(KetchReplica replica)
-
-
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 atrefs/txn/accepted
- Returns:
- last known Git commit at
refs/txn/accepted
-
getCommitted
@Nullable public ObjectId getCommitted()
Get last known Git commit atrefs/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.
-
-