Class TopologyManagerImpl
java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.broker.partitioning.topology.TopologyManagerImpl
- All Implemented Interfaces:
ClusterMembershipEventListener,EventFilter<ClusterMembershipEvent>,EventListener<ClusterMembershipEvent>,TopologyManager,PartitionListener,AsyncClosable,ConcurrencyControl,AutoCloseable
public final class TopologyManagerImpl
extends Actor
implements TopologyManager, ClusterMembershipEventListener, PartitionListener
-
Nested Class Summary
Nested classes/interfaces inherited from class io.camunda.zeebe.scheduler.Actor
Actor.ActorBuilder -
Field Summary
Fields inherited from class io.camunda.zeebe.scheduler.Actor
actor, ACTOR_PROP_NAME, ACTOR_PROP_PARTITION_ID -
Constructor Summary
ConstructorsConstructorDescriptionTopologyManagerImpl(ClusterMembershipService membershipService, BrokerInfo localBroker) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidevent(ClusterMembershipEvent clusterMembershipEvent) getName()protected voidonBecomingFollower(int partitionId, long term) Is called by theZeebePartitionon becoming partition follower after all partition installation/clean up related things are done.onBecomingInactive(int partitionId, long term) Is called by theZeebePartitionon becoming inactive after a Raft role change or a failed transition.onBecomingLeader(int partitionId, long term, LogStream logStream, QueryService queryService) Is called by theZeebePartitionon becoming partition leader after all partition installation/clean up related things are done.voidonHealthChanged(int partitionId, HealthStatus status) voidsetFollower(int partitionId) setInactive(int partitionId) setLeader(long term, int partitionId) Methods inherited from class io.camunda.zeebe.scheduler.Actor
buildActorName, close, closeAsync, createContext, getContext, handleFailure, isActorClosed, newActor, onActorClosed, onActorCloseRequested, onActorClosing, onActorFailed, onActorStarting, run, runOnCompletion, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.scheduler.ConcurrencyControl
createCompletedFuture, createFutureMethods inherited from interface io.atomix.utils.event.EventFilter
isRelevant
-
Constructor Details
-
TopologyManagerImpl
-
-
Method Details
-
onBecomingFollower
Description copied from interface:PartitionListenerIs called by theZeebePartitionon becoming partition follower after all partition installation/clean up related things are done.- Specified by:
onBecomingFollowerin interfacePartitionListener- Parameters:
partitionId- the corresponding partition idterm- the current term- Returns:
- future that should be completed by the listener
-
onBecomingLeader
public ActorFuture<Void> onBecomingLeader(int partitionId, long term, LogStream logStream, QueryService queryService) Description copied from interface:PartitionListenerIs called by theZeebePartitionon becoming partition leader after all partition installation/clean up related things are done.- Specified by:
onBecomingLeaderin interfacePartitionListener- Parameters:
partitionId- the corresponding partition idterm- the current termlogStream- the corresponding log streamqueryService- the corresponding query service- Returns:
- future that should be completed by the listener
-
onBecomingInactive
Description copied from interface:PartitionListenerIs called by theZeebePartitionon becoming inactive after a Raft role change or a failed transition.- Specified by:
onBecomingInactivein interfacePartitionListener- Parameters:
partitionId- the corresponding partition idterm- the current term- Returns:
- future that should be completed by the listener
-
getName
-
onActorStarted
protected void onActorStarted()- Overrides:
onActorStartedin classActor
-
setLeader
-
setFollower
-
setInactive
-
event
- Specified by:
eventin interfaceEventListener<ClusterMembershipEvent>
-
removeTopologyPartitionListener
- Specified by:
removeTopologyPartitionListenerin interfaceTopologyManager
-
addTopologyPartitionListener
- Specified by:
addTopologyPartitionListenerin interfaceTopologyManager
-
onHealthChanged
-