Uses of Class
io.permazen.kv.raft.Timestamp
Packages that use Timestamp
Package
Description
A distributed
KVDatabase
based on the Raft consensus algorithm.Raft inter-node messages.
-
Uses of Timestamp in io.permazen.kv.raft
Fields in io.permazen.kv.raft with type parameters of type TimestampModifier and TypeFieldDescriptionstatic final 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 TimestampModifier and TypeMethodDescriptionNonLeaderRole.getElectionTimeout()
Get the election timer deadline, if currently running.RaftKVTransaction.getLastStateChangeTime()
Get theTimestamp
of the most recent state change.Follower.getLeaderTimestamp()
Get the most recent (leader's) request timestamp returned by this follower in a response, if any.LeaderRole.getLeaseTimeout()
Get this leader's "lease timeout".RaftKVDatabase.getLinearizableCommitTimestamp()
Get the timestamp of the most recently committed linearizable transaction.Follower.getSnapshotTimestamp()
Get the (leader's) timestamp of the most recent snapshot install sent to this follower, if any.Timestamp.offset
(int offset) Return this timestamp offset by the given amount.Methods in io.permazen.kv.raft with parameters of type TimestampModifier and TypeMethodDescriptionint
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 TimestampModifier and TypeMethodDescriptionCommitResponse.getCommitLeaderLeaseTimeout()
Get the minimum required leader lease timeout value to commit, if any.AppendRequest.getLeaderLeaseTimeout()
AppendRequest.getLeaderTimestamp()
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 TimestampModifier and TypeMethodDescriptionprotected 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 TimestampModifierConstructorDescriptionAppendRequest
(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.