Package io.atomix.raft.partition.impl
Class RaftPartitionServer
java.lang.Object
io.atomix.raft.partition.impl.RaftPartitionServer
- All Implemented Interfaces:
Managed<RaftPartitionServer>,HealthMonitorable
public class RaftPartitionServer
extends Object
implements Managed<RaftPartitionServer>, HealthMonitorable
Partition server.-
Constructor Summary
ConstructorsConstructorDescriptionRaftPartitionServer(RaftPartition partition, RaftPartitionGroupConfig config, MemberId localMemberId, ClusterMembershipService membershipService, ClusterCommunicationService clusterCommunicator, PartitionMetadata partitionMetadata) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommitListener(RaftCommitListener commitListener) voidaddCommittedEntryListener(RaftCommittedEntryListener commitListener) voidaddFailureListener(FailureListener listener) voidaddRoleChangeListener(RaftRoleChangeListener listener) voidcompact()Compacts the log to the latest known compactable index.voiddelete()Deletes the server.flushLog()getRole()longgetTerm()booleanpromote()voidremoveCommitListener(RaftCommitListener commitListener) voidremoveCommittedEntryListener(RaftCommittedEntryListener commitListener) voidremoveFailureListener(FailureListener listener) voidvoidvoidsetCompactableIndex(long index) start()stepDown()stop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.util.health.HealthMonitorable
getName
-
Constructor Details
-
RaftPartitionServer
public RaftPartitionServer(RaftPartition partition, RaftPartitionGroupConfig config, MemberId localMemberId, ClusterMembershipService membershipService, ClusterCommunicationService clusterCommunicator, PartitionMetadata partitionMetadata)
-
-
Method Details
-
start
- Specified by:
startin interfaceManaged<RaftPartitionServer>
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceManaged<RaftPartitionServer>
-
stop
- Specified by:
stopin interfaceManaged<RaftPartitionServer>
-
compact
Compacts the log to the latest known compactable index. Compaction occurs asynchronously.- Returns:
- a future to be completed once the log has been compacted
-
flushLog
-
setCompactableIndex
public void setCompactableIndex(long index) -
openReader
-
addRoleChangeListener
-
getHealthReport
- Specified by:
getHealthReportin interfaceHealthMonitorable
-
addFailureListener
- Specified by:
addFailureListenerin interfaceHealthMonitorable
-
removeFailureListener
- Specified by:
removeFailureListenerin interfaceHealthMonitorable
-
removeRoleChangeListener
-
addCommitListener
-
removeCommitListener
-
addCommittedEntryListener
-
removeCommittedEntryListener
-
addSnapshotReplicationListener
-
removeSnapshotReplicationListener
-
getPersistedSnapshotStore
-
delete
public void delete()Deletes the server. -
getAppender
-
getRole
-
getTerm
public long getTerm() -
getMemberId
-
stepDown
-
promote
-