Uses of Class
io.permazen.kv.raft.Timestamp
-
Packages that use Timestamp Package Description io.permazen.kv.raft A distributedKVDatabase
based on the Raft consensus algorithm.io.permazen.kv.raft.msg Raft inter-node messages. -
-
Uses of Timestamp in io.permazen.kv.raft
Fields in io.permazen.kv.raft with type parameters of type Timestamp Modifier and Type Field Description static Comparator<Timestamp>
Timestamp. NULL_FIRST_SORT
Sorts possibly nullTimestamp
s in chronological order, with null sorting first.Methods in io.permazen.kv.raft that return Timestamp Modifier and Type Method Description Timestamp
NonLeaderRole. getElectionTimeout()
Get the election timer deadline, if currently running.Timestamp
RaftKVTransaction. getLastStateChangeTime()
Get theTimestamp
of the most recent state change.Timestamp
Follower. getLeaderTimestamp()
Get the most recent (leader's) request timestamp returned by this follower in a response, if any.Timestamp
LeaderRole. getLeaseTimeout()
Get this leader's "lease timeout".Timestamp
RaftKVDatabase. getLinearizableCommitTimestamp()
Get the timestamp of the most recently committed linearizable transaction.Timestamp
Follower. getSnapshotTimestamp()
Get the (leader's) timestamp of the most recent snapshot install sent to this follower, if any.Timestamp
Timestamp. offset(int offset)
Return this timestamp offset by the given amount.Methods in io.permazen.kv.raft with parameters of type Timestamp Modifier and Type Method Description int
Timestamp. compareTo(Timestamp that)
Compare two instances, where "smaller" means earlier in time.protected boolean
Role. isLeaderLeaseActiveAt(Timestamp time)
Determine whether the leader's lease timeout extends past the given time, that is, it is known that if the current leader is deposed by a new leader, then that deposition must occur after the given time.int
Timestamp. offsetFrom(Timestamp base)
Get the number of milliseconds this instance is offset from the given instance. -
Uses of Timestamp in io.permazen.kv.raft.msg
Methods in io.permazen.kv.raft.msg that return Timestamp Modifier and Type Method Description Timestamp
CommitResponse. getCommitLeaderLeaseTimeout()
Get the minimum required leader lease timeout value to commit, if any.Timestamp
AppendRequest. getLeaderLeaseTimeout()
Timestamp
AppendRequest. getLeaderTimestamp()
Timestamp
AppendResponse. getLeaderTimestamp()
Get theleaderTimestamp
from the correspondingAppendRequest
.protected static Timestamp
Message. getTimestamp(ByteBuffer buf, int version)
Deserialize aTimestamp
value previously serialized byputTimestamp()
from the buffer.Methods in io.permazen.kv.raft.msg with parameters of type Timestamp Modifier and Type Method Description protected static int
Message. calculateSize(Timestamp timestamp, int version)
protected static void
Message. putTimestamp(ByteBuffer dest, Timestamp timestamp, int version)
Serialize aTimestamp
value into the buffer.Constructors in io.permazen.kv.raft.msg with parameters of type Timestamp Constructor Description AppendRequest(int clusterId, String senderId, String recipientId, long term, Timestamp leaderTimestamp, Timestamp leaderLeaseTimeout, long leaderCommit, long prevLogTerm, long prevLogIndex)
Constructor for a "probe" that does not contain a log entry.AppendRequest(int clusterId, String senderId, String recipientId, long term, Timestamp leaderTimestamp, Timestamp leaderLeaseTimeout, long leaderCommit, long prevLogTerm, long prevLogIndex, long logEntryTerm, ByteBuffer mutationData)
Constructor for a request that contains an actual log entry.AppendResponse(int clusterId, String senderId, String recipientId, long term, Timestamp leaderTimestamp, boolean success, long matchIndex, long lastLogIndex)
Constructor.CommitResponse(int clusterId, String senderId, String recipientId, long term, long txId, long commitTerm, long commitIndex, Timestamp commitLeaderLeaseTimeout)
Constructor for success case when a minimum leader lease timeout is required for commit (read-only transaction when leader has not heard from a majority of followers in at least a minimum election timeout.PingRequest(int clusterId, String senderId, String recipientId, long term, Timestamp timestamp)
Constructor.PingResponse(int clusterId, String senderId, String recipientId, long term, Timestamp timestamp)
Constructor.
-