public class MetadataRaftGroupManager extends Object implements SnapshotAwareService<MetadataRaftGroupSnapshot>
Modifier and Type | Field and Description |
---|---|
static RaftGroupId |
INITIAL_METADATA_GROUP_ID |
public static final RaftGroupId INITIAL_METADATA_GROUP_ID
public MetadataRaftGroupSnapshot takeSnapshot(CPGroupId groupId, long commitIndex)
SnapshotAwareService
CPGroupId
.
The snapshot object returned from this method will be stored among
the Raft log and it can be sent to other Raft nodes anytime. Therefore,
this method must not return a snapshot object that can mutate after
the takeSnapshot() call.takeSnapshot
in interface SnapshotAwareService<MetadataRaftGroupSnapshot>
groupId
- CPGroupId
which is snapshot requested forcommitIndex
- commitIndex of the taken snapshotCPGroupId
.public void restoreSnapshot(CPGroupId groupId, long commitIndex, MetadataRaftGroupSnapshot snapshot)
SnapshotAwareService
CPGroupId
.restoreSnapshot
in interface SnapshotAwareService<MetadataRaftGroupSnapshot>
groupId
- CPGroupId
of the snapshot to be restoredcommitIndex
- commitIndex of the restored snapshotsnapshot
- snapshot for specified CPGroupId
public RaftGroupId getMetadataGroupId()
public Collection<CPGroupId> getGroupIds()
public Collection<CPGroupId> getActiveGroupIds()
public CPGroupInfo getGroup(CPGroupId groupId)
public CPGroupInfo getActiveGroup(String groupName)
public boolean initMetadataGroup(long commitIndex, CPMemberInfo callerCPMember, List<CPMemberInfo> discoveredCPMembers, long expectedGroupIdSeed)
public CPGroupId createRaftGroup(String groupName, Collection<CPMemberInfo> members, long commitIndex)
public void triggerDestroyRaftGroup(CPGroupId groupId)
public void forceDestroyRaftGroup(String groupName)
public boolean removeMember(long commitIndex, CPMemberInfo leavingMember)
public MembershipChangeSchedule completeRaftGroupMembershipChanges(long commitIndex, Map<CPGroupId,Tuple2<Long,Long>> changedGroups)
public Collection<CPMemberInfo> getActiveMembers()
public void handleMetadataGroupId(RaftGroupId newMetadataGroupId)
public Collection<CPGroupId> getDestroyingGroupIds()
public MembershipChangeSchedule getMembershipChangeSchedule()
public boolean addMember(long commitIndex, CPMemberInfo member)
public void checkMetadataGroupInitSuccessful()
public void disableDiscovery()
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.