Package | Description |
---|---|
com.hazelcast.cp.exception |
Contains exceptions that can be thrown by APIs of CP Subsystem
|
com.hazelcast.cp.internal |
Contains implementation of CP Subsystem
|
com.hazelcast.cp.internal.operation |
Contains operations for the Raft Invocation SPI
|
com.hazelcast.cp.internal.operation.integration |
Contains Hazelcast operations that carry out Raft RPCs
|
com.hazelcast.cp.internal.raft.exception |
Contains exception classes that can be thrown by CP Subsystem
|
com.hazelcast.cp.internal.raft.impl |
Contains implementation classes of the Raft algorithm
|
com.hazelcast.cp.internal.raft.impl.command |
Contains
RaftGroupCmd
implementations that are used by the core Raft algorithm implementation |
com.hazelcast.cp.internal.raft.impl.dto |
Contains structs that are used in Raft RPCs
|
com.hazelcast.cp.internal.raft.impl.handler |
Contains request/response handler tasks.
|
com.hazelcast.cp.internal.raft.impl.log |
Contains the log abstraction which is maintained by the Raft algorithm
|
com.hazelcast.cp.internal.raft.impl.persistence | |
com.hazelcast.cp.internal.raft.impl.state |
Contains classes that keep state of Raft nodes
|
com.hazelcast.cp.internal.raft.impl.task |
Contains tasks running on leader or leader-candidates.
|
com.hazelcast.cp.internal.raftop |
Contains operations that are used in Hazelcast's Raft implementation
|
com.hazelcast.cp.internal.raftop.metadata |
Contains operations that are used in the Metadata CP group
|
Constructor and Description |
---|
CannotReplicateException(RaftEndpoint leader) |
LeaderDemotedException(RaftEndpoint local,
RaftEndpoint leader) |
NotLeaderException(CPGroupId groupId,
RaftEndpoint local,
RaftEndpoint leader) |
StaleAppendRequestException(RaftEndpoint leader) |
Modifier and Type | Class and Description |
---|---|
class |
RaftEndpointImpl
Represents an endpoint that runs the Raft consensus algorithm as a member of
a Raft group.
|
Modifier and Type | Method and Description |
---|---|
RaftEndpoint |
RaftService.getLocalCPEndpoint() |
RaftEndpoint |
CPMemberInfo.toRaftEndpoint() |
Modifier and Type | Method and Description |
---|---|
Collection<RaftEndpoint> |
CPGroupSummary.initialMembers() |
Collection<RaftEndpoint> |
CPGroupInfo.initialMembers() |
Collection<RaftEndpoint> |
CPGroupInfo.memberImpls() |
Collection<RaftEndpoint> |
CPGroupInfo.members() |
Modifier and Type | Method and Description |
---|---|
CPGroupId |
MetadataRaftGroupManager.createRaftGroup(String groupName,
Collection<RaftEndpoint> groupEndpoints,
long commitIndex) |
void |
RaftService.createRaftNode(CPGroupId groupId,
Collection<RaftEndpoint> members) |
Constructor and Description |
---|
CPGroupInfo(RaftGroupId id,
Collection<RaftEndpoint> members) |
CPGroupSummary(CPGroupId id,
CPGroup.CPGroupStatus status,
Collection<RaftEndpoint> initialMembers,
Collection<CPMember> members) |
Constructor and Description |
---|
ChangeRaftGroupMembershipOp(CPGroupId groupId,
long membersCommitIndex,
RaftEndpoint member,
MembershipChangeMode membershipChangeMode) |
Modifier and Type | Field and Description |
---|---|
protected RaftEndpoint |
AsyncRaftOp.target |
Modifier and Type | Method and Description |
---|---|
Operation |
AsyncRaftOp.setTargetEndpoint(RaftEndpoint target) |
Modifier and Type | Method and Description |
---|---|
Collection<RaftEndpoint> |
MismatchingGroupMembersCommitIndexException.getMembers() |
Constructor and Description |
---|
MemberAlreadyExistsException(RaftEndpoint member) |
MemberDoesNotExistException(RaftEndpoint member) |
Constructor and Description |
---|
MismatchingGroupMembersCommitIndexException(long commitIndex,
Collection<RaftEndpoint> members) |
Modifier and Type | Method and Description |
---|---|
RaftEndpoint |
RaftNodeImpl.getLeader() |
RaftEndpoint |
RaftNode.getLeader()
Returns the known leader endpoint.
|
RaftEndpoint |
RaftNodeImpl.getLocalMember() |
RaftEndpoint |
RaftNode.getLocalMember()
Returns the Raft endpoint for this node.
|
Modifier and Type | Method and Description |
---|---|
Collection<RaftEndpoint> |
RaftNodeImpl.getAppliedMembers() |
Collection<RaftEndpoint> |
RaftNode.getAppliedMembers()
Returns the currently effective member list of the raft group this node
belongs to.
|
Collection<RaftEndpoint> |
RaftNodeImpl.getCommittedMembers() |
Collection<RaftEndpoint> |
RaftNode.getCommittedMembers()
Returns the last committed member list of the raft group this node
belongs to.
|
Collection<RaftEndpoint> |
RaftNodeImpl.getInitialMembers() |
Collection<RaftEndpoint> |
RaftNode.getInitialMembers()
Returns the initial member list of the Raft group this node belongs to.
|
Modifier and Type | Method and Description |
---|---|
CPMember |
RaftIntegration.getCPMember(RaftEndpoint target)
Returns the CP member instance of the given Raft endpoint
|
boolean |
RaftIntegration.isReachable(RaftEndpoint endpoint)
Returns true if the endpoint is reachable by the time this method
is called, false otherwise.
|
void |
RaftNodeImpl.leader(RaftEndpoint endpoint)
Updates the known leader endpoint and calls
RaftIntegration.onNodeStatusChange(RaftNodeStatus) . |
static RaftNodeImpl |
RaftNodeImpl.newRaftNode(CPGroupId groupId,
RaftEndpoint localMember,
Collection<RaftEndpoint> members,
RaftAlgorithmConfig config,
RaftIntegration integration)
Creates a new Raft node with an empty initial state.
|
static RaftNodeImpl |
RaftNodeImpl.newRaftNode(CPGroupId groupId,
RaftEndpoint localMember,
Collection<RaftEndpoint> members,
RaftAlgorithmConfig config,
RaftIntegration integration,
RaftStateStore raftStateStore)
Creates a new Raft node with an empty initial state
and a
RaftStateStore to persist Raft state changes |
InternalCompletableFuture |
RaftNodeImpl.replicateMembershipChange(RaftEndpoint member,
MembershipChangeMode mode) |
InternalCompletableFuture |
RaftNode.replicateMembershipChange(RaftEndpoint member,
MembershipChangeMode mode)
Replicates the membership change to the Raft group.
|
InternalCompletableFuture |
RaftNodeImpl.replicateMembershipChange(RaftEndpoint member,
MembershipChangeMode mode,
long groupMembersCommitIndex) |
InternalCompletableFuture |
RaftNode.replicateMembershipChange(RaftEndpoint member,
MembershipChangeMode mode,
long groupMembersCommitIndex)
Replicates the membership change to the Raft group, if expected members
commit index is equal to the actual one stored in Raft state.
|
void |
RaftNodeImpl.send(AppendFailureResponse response,
RaftEndpoint target) |
boolean |
RaftIntegration.send(AppendFailureResponse response,
RaftEndpoint target)
Sends the given
AppendFailureResponse DTO to target endpoint
to be handled via RaftNode.handleAppendResponse(AppendFailureResponse) . |
boolean |
RaftIntegration.send(AppendRequest request,
RaftEndpoint target)
Sends the given
AppendRequest DTO to target endpoint
to be handled via RaftNode.handleAppendRequest(AppendRequest) . |
void |
RaftNodeImpl.send(AppendSuccessResponse response,
RaftEndpoint target) |
boolean |
RaftIntegration.send(AppendSuccessResponse response,
RaftEndpoint target)
Sends the given
AppendSuccessResponse DTO to target endpoint
to be handled via RaftNode.handleAppendResponse(AppendSuccessResponse) . |
boolean |
RaftIntegration.send(InstallSnapshot request,
RaftEndpoint target)
Sends the given
InstallSnapshot DTO to target endpoint
to be handled via RaftNode.handleInstallSnapshot(InstallSnapshot) . |
void |
RaftNodeImpl.send(PreVoteRequest request,
RaftEndpoint target) |
boolean |
RaftIntegration.send(PreVoteRequest request,
RaftEndpoint target)
Sends the given
PreVoteRequest DTO to target endpoint
to be handled by via RaftNode.handlePreVoteRequest(PreVoteRequest) . |
void |
RaftNodeImpl.send(PreVoteResponse response,
RaftEndpoint target) |
boolean |
RaftIntegration.send(PreVoteResponse response,
RaftEndpoint target)
Sends the given
PreVoteResponse DTO to target endpoint
to be handled via RaftNode.handlePreVoteResponse(PreVoteResponse) . |
void |
RaftNodeImpl.send(TriggerLeaderElection request,
RaftEndpoint target) |
boolean |
RaftIntegration.send(TriggerLeaderElection request,
RaftEndpoint target)
Sends the given
TriggerLeaderElection DTO to target endpoint
to be handled via RaftNode.handleTriggerLeaderElection(TriggerLeaderElection) . |
void |
RaftNodeImpl.send(VoteRequest request,
RaftEndpoint target) |
boolean |
RaftIntegration.send(VoteRequest request,
RaftEndpoint target)
Sends the given
VoteRequest DTO to target endpoint
to be handled via RaftNode.handleVoteRequest(VoteRequest) . |
void |
RaftNodeImpl.send(VoteResponse response,
RaftEndpoint target) |
boolean |
RaftIntegration.send(VoteResponse response,
RaftEndpoint target)
Sends the given
VoteResponse DTO to target endpoint
to be handled via RaftNode.handleVoteResponse(VoteResponse) . |
void |
RaftNodeImpl.sendAppendRequest(RaftEndpoint follower)
Sends an append-entries request to the follower member.
|
InternalCompletableFuture |
RaftNodeImpl.transferLeadership(RaftEndpoint endpoint) |
InternalCompletableFuture |
RaftNode.transferLeadership(RaftEndpoint endpoint)
Transfers group leadership to the given endpoint, if the local Raft node
is the leader with ACTIVE status and the endpoint is a group member.
|
Modifier and Type | Method and Description |
---|---|
static RaftNodeImpl |
RaftNodeImpl.newRaftNode(CPGroupId groupId,
RaftEndpoint localMember,
Collection<RaftEndpoint> members,
RaftAlgorithmConfig config,
RaftIntegration integration)
Creates a new Raft node with an empty initial state.
|
static RaftNodeImpl |
RaftNodeImpl.newRaftNode(CPGroupId groupId,
RaftEndpoint localMember,
Collection<RaftEndpoint> members,
RaftAlgorithmConfig config,
RaftIntegration integration,
RaftStateStore raftStateStore)
Creates a new Raft node with an empty initial state
and a
RaftStateStore to persist Raft state changes |
void |
RaftNodeImpl.updateGroupMembers(long logIndex,
Collection<RaftEndpoint> members)
Updates Raft group members.
|
Modifier and Type | Method and Description |
---|---|
RaftEndpoint |
UpdateRaftGroupMembersCmd.getMember() |
Modifier and Type | Method and Description |
---|---|
Collection<RaftEndpoint> |
UpdateRaftGroupMembersCmd.getMembers() |
Constructor and Description |
---|
UpdateRaftGroupMembersCmd(Collection<RaftEndpoint> members,
RaftEndpoint member,
MembershipChangeMode mode) |
Constructor and Description |
---|
UpdateRaftGroupMembersCmd(Collection<RaftEndpoint> members,
RaftEndpoint member,
MembershipChangeMode mode) |
Modifier and Type | Method and Description |
---|---|
RaftEndpoint |
VoteRequest.candidate() |
RaftEndpoint |
PreVoteRequest.candidate() |
RaftEndpoint |
AppendFailureResponse.follower() |
RaftEndpoint |
AppendSuccessResponse.follower() |
RaftEndpoint |
AppendRequest.leader() |
RaftEndpoint |
InstallSnapshot.leader() |
RaftEndpoint |
TriggerLeaderElection.leader() |
RaftEndpoint |
VoteResponse.voter() |
RaftEndpoint |
PreVoteResponse.voter() |
Constructor and Description |
---|
AppendFailureResponse(RaftEndpoint follower,
int term,
long expectedNextIndex) |
AppendRequest(RaftEndpoint leader,
int term,
int prevLogTerm,
long prevLogIndex,
long leaderCommitIndex,
LogEntry[] entries,
long queryRound) |
AppendSuccessResponse(RaftEndpoint follower,
int term,
long lastLogIndex,
long queryRound) |
InstallSnapshot(RaftEndpoint leader,
int term,
SnapshotEntry snapshot,
long queryRound) |
PreVoteRequest(RaftEndpoint candidate,
int nextTerm,
int lastLogTerm,
long lastLogIndex) |
PreVoteResponse(RaftEndpoint voter,
int term,
boolean granted) |
TriggerLeaderElection(RaftEndpoint leader,
int term,
int lastLogTerm,
long lastLogIndex) |
VoteRequest(RaftEndpoint candidate,
int term,
int lastLogTerm,
long lastLogIndex,
boolean disruptive) |
VoteResponse(RaftEndpoint voter,
int term,
boolean granted) |
Modifier and Type | Method and Description |
---|---|
protected abstract RaftEndpoint |
AbstractResponseHandlerTask.sender() |
protected RaftEndpoint |
VoteResponseHandlerTask.sender() |
protected RaftEndpoint |
PreVoteResponseHandlerTask.sender() |
protected RaftEndpoint |
AppendSuccessResponseHandlerTask.sender() |
protected RaftEndpoint |
AppendFailureResponseHandlerTask.sender() |
Modifier and Type | Method and Description |
---|---|
Collection<RaftEndpoint> |
SnapshotEntry.groupMembers() |
Constructor and Description |
---|
SnapshotEntry(int term,
long index,
Object operation,
long groupMembersLogIndex,
Collection<RaftEndpoint> groupMembers) |
Modifier and Type | Method and Description |
---|---|
RaftEndpoint |
RestoredRaftState.localEndpoint() |
RaftEndpoint |
RestoredRaftState.votedFor() |
Modifier and Type | Method and Description |
---|---|
Collection<RaftEndpoint> |
RestoredRaftState.initialMembers() |
Modifier and Type | Method and Description |
---|---|
void |
RaftStateStore.persistInitialMembers(RaftEndpoint localMember,
Collection<RaftEndpoint> initialMembers)
Persists the given local Raft endpoint and initial Raft group members.
|
void |
NopRaftStateStore.persistInitialMembers(RaftEndpoint localMember,
Collection<RaftEndpoint> initialMembers) |
void |
RaftStateStore.persistTerm(int term,
RaftEndpoint votedFor)
Persists the term and the Raft endpoint that the local node voted for in
the given term.
|
void |
NopRaftStateStore.persistTerm(int term,
RaftEndpoint votedFor) |
Modifier and Type | Method and Description |
---|---|
void |
RaftStateStore.persistInitialMembers(RaftEndpoint localMember,
Collection<RaftEndpoint> initialMembers)
Persists the given local Raft endpoint and initial Raft group members.
|
void |
NopRaftStateStore.persistInitialMembers(RaftEndpoint localMember,
Collection<RaftEndpoint> initialMembers) |
Constructor and Description |
---|
RestoredRaftState(RaftEndpoint localEndpoint,
Collection<RaftEndpoint> initialMembers,
int term,
RaftEndpoint votedFor,
SnapshotEntry snapshot,
LogEntry[] entries) |
Constructor and Description |
---|
RestoredRaftState(RaftEndpoint localEndpoint,
Collection<RaftEndpoint> initialMembers,
int term,
RaftEndpoint votedFor,
SnapshotEntry snapshot,
LogEntry[] entries) |
Modifier and Type | Method and Description |
---|---|
RaftEndpoint |
LeadershipTransferState.endpoint() |
RaftEndpoint |
RaftState.leader()
Returns the known leader
|
RaftEndpoint |
RaftState.localEndpoint() |
RaftEndpoint |
RaftState.votedFor()
Returns the endpoint this note voted for
|
Modifier and Type | Method and Description |
---|---|
Map<RaftEndpoint,FollowerState> |
LeaderState.getFollowerStates() |
Collection<RaftEndpoint> |
RaftState.initialMembers() |
Collection<RaftEndpoint> |
RaftGroupMembers.members()
Return all members in this group.
|
Collection<RaftEndpoint> |
RaftState.members()
Returns all members in the last applied group members
|
Collection<RaftEndpoint> |
RaftGroupMembers.remoteMembers()
Returns remote members in this group, excluding the local member.
|
Collection<RaftEndpoint> |
RaftState.remoteMembers()
Returns remote members in the last applied group members
|
Modifier and Type | Method and Description |
---|---|
void |
LeaderState.add(RaftEndpoint follower,
long lastLogIndex)
Add a new follower with the leader's
lastLogIndex . |
FollowerState |
LeaderState.getFollowerState(RaftEndpoint follower) |
boolean |
CandidateState.grantVote(RaftEndpoint address)
Persists vote for the endpoint during election.
|
boolean |
RaftState.initLeadershipTransfer(RaftEndpoint targetEndpoint,
InternalCompletableFuture resultFuture)
Initializes the leadership transfer state, and returns
true
if the leadership transfer is triggered for the first time
and returns false if there is an ongoing leadership transfer
process. |
boolean |
QueryState.isAckNeeded(RaftEndpoint follower,
int majority) |
boolean |
RaftGroupMembers.isKnownMember(RaftEndpoint endpoint)
Returns true if the endpoint is a member of this group, false otherwise.
|
boolean |
RaftState.isKnownMember(RaftEndpoint endpoint)
Returns true if the endpoint is a member of the last applied group, false otherwise.
|
void |
RaftState.leader(RaftEndpoint endpoint)
Updates the known leader
|
static RaftState |
RaftState.newRaftState(CPGroupId groupId,
RaftEndpoint localEndpoint,
Collection<RaftEndpoint> endpoints,
int logCapacity) |
static RaftState |
RaftState.newRaftState(CPGroupId groupId,
RaftEndpoint localEndpoint,
Collection<RaftEndpoint> endpoints,
int logCapacity,
RaftStateStore stateStore) |
void |
LeadershipTransferState.notify(RaftEndpoint targetEndpoint,
InternalCompletableFuture otherFuture) |
void |
RaftState.persistVote(int term,
RaftEndpoint endpoint)
Persist a vote for the endpoint in current term during leader election.
|
void |
LeaderState.remove(RaftEndpoint follower)
Removes a follower from leader maintained state.
|
boolean |
QueryState.removeAck(RaftEndpoint follower)
Returns
true if the given follower is removed from the ack list. |
boolean |
QueryState.tryAck(long queryRound,
RaftEndpoint follower)
Returns
true if the given follower is accepted as an acker
for the current query round. |
Modifier and Type | Method and Description |
---|---|
static RaftState |
RaftState.newRaftState(CPGroupId groupId,
RaftEndpoint localEndpoint,
Collection<RaftEndpoint> endpoints,
int logCapacity) |
static RaftState |
RaftState.newRaftState(CPGroupId groupId,
RaftEndpoint localEndpoint,
Collection<RaftEndpoint> endpoints,
int logCapacity,
RaftStateStore stateStore) |
void |
RaftState.restoreGroupMembers(long logIndex,
Collection<RaftEndpoint> members)
Restores group members from the snapshot.
|
void |
RaftState.updateGroupMembers(long logIndex,
Collection<RaftEndpoint> members)
Initializes the last applied group members with the members and logIndex.
|
Constructor and Description |
---|
RaftGroupMembers(long index,
Collection<RaftEndpoint> endpoints,
RaftEndpoint localEndpoint) |
Constructor and Description |
---|
RaftGroupMembers(long index,
Collection<RaftEndpoint> endpoints,
RaftEndpoint localEndpoint) |
Modifier and Type | Method and Description |
---|---|
protected RaftEndpoint |
RaftNodeStatusAwareTask.localMember() |
Constructor and Description |
---|
InitLeadershipTransferTask(RaftNodeImpl raftNode,
RaftEndpoint targetEndpoint,
InternalCompletableFuture resultFuture) |
MembershipChangeTask(RaftNodeImpl raftNode,
InternalCompletableFuture resultFuture,
RaftEndpoint member,
MembershipChangeMode membershipChangeMode) |
MembershipChangeTask(RaftNodeImpl raftNode,
InternalCompletableFuture resultFuture,
RaftEndpoint member,
MembershipChangeMode membershipChangeMode,
Long groupMembersCommitIndex) |
Constructor and Description |
---|
GetInitialRaftGroupMembersIfCurrentGroupMemberOp(RaftEndpoint endpoint) |
Constructor and Description |
---|
CreateRaftGroupOp(String groupName,
Collection<RaftEndpoint> members) |
CreateRaftNodeOp(CPGroupId groupId,
Collection<RaftEndpoint> initialMembers) |
Copyright © 2019 Hazelcast, Inc.. All rights reserved.