Package org.eclipse.jgit.internal.ketch
Class ReplicaSnapshot
- java.lang.Object
-
- org.eclipse.jgit.internal.ketch.ReplicaSnapshot
-
public class ReplicaSnapshot extends java.lang.ObjectA snapshot of a replica.- See Also:
LeaderSnapshot
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ObjectIdaccepted(package private) ObjectIdcommitted(package private) java.lang.Stringerror(package private) KetchReplicareplica(package private) longretryAtMillis(package private) KetchReplica.Statestate
-
Constructor Summary
Constructors Constructor Description ReplicaSnapshot(KetchReplica replica)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectIdgetAccepted()Get last known Git commit atrefs/txn/acceptedObjectIdgetCommitted()Get last known Git commit atrefs/txn/committedjava.lang.StringgetErrorMessage()Get error messageKetchReplicagetReplica()Get the replica this snapshot describes the state ofjava.util.DategetRetryAt()Get when the leader will retry communication with the offline or lagging replicaKetchReplica.StategetState()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.OFFLINEan 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.
-
-