| Package | Description |
|---|---|
| org.jsimpledb.kv.raft |
A distributed
KVDatabase based on the Raft consensus algorithm. |
| org.jsimpledb.kv.raft.msg |
Raft inter-node messages.
|
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Timestamp> |
Timestamp.NULL_FIRST_SORT
Sorts possibly null
Timestamps in chronological order, with null sorting first. |
| Modifier and Type | Method and Description |
|---|---|
Timestamp |
NonLeaderRole.getElectionTimeout()
Get the election timer deadline, if currently running.
|
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 |
Timestamp.offset(int offset)
Return this timestamp offset by the given amount.
|
| Modifier and Type | Method and Description |
|---|---|
int |
Timestamp.compareTo(Timestamp that)
Compare two instances, where "smaller" means earlier in time.
|
int |
Timestamp.offsetFrom(Timestamp base)
Get the number of milliseconds this instance is offset from the given instance.
|
| Modifier and Type | Method and Description |
|---|---|
Timestamp |
CommitResponse.getCommitLeaderLeaseTimeout()
Get the minimum required leader lease timeout value to commit, if any.
|
Timestamp |
AppendRequest.getLeaderLeaseTimeout() |
Timestamp |
AppendResponse.getLeaderTimestamp()
Get the
leaderTimestamp from the corresponding AppendRequest. |
Timestamp |
AppendRequest.getLeaderTimestamp() |
protected static Timestamp |
Message.getTimestamp(ByteBuffer buf)
Deserialize a
Timestamp value previously serialized by putTimestamp() from the buffer. |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
Message.calculateSize(Timestamp timestamp) |
protected static void |
Message.putTimestamp(ByteBuffer dest,
Timestamp timestamp)
Serialize a
Timestamp value into the buffer. |
| Constructor and 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.
|
Copyright © 2016. All rights reserved.