Class BrokerTopologyManagerImpl
java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.gateway.impl.broker.cluster.BrokerTopologyManagerImpl
- All Implemented Interfaces:
ClusterMembershipEventListener,EventFilter<ClusterMembershipEvent>,EventListener<ClusterMembershipEvent>,BrokerTopologyManager,AsyncClosable,ConcurrencyControl,GatewayClusterTopologyService.Listener,AutoCloseable
public final class BrokerTopologyManagerImpl
extends Actor
implements BrokerTopologyManager, ClusterMembershipEventListener, GatewayClusterTopologyService.Listener
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTopologyListener(BrokerTopologyListener listener) Adds the topology listener.voidevent(ClusterMembershipEvent event) getName()protected voidvoidonClusterTopologyChanged(ClusterTopology clusterTopology) voidremoveTopologyListener(BrokerTopologyListener listener) Removes the given topology listener by identity.voidsetTopology(BrokerClusterStateImpl topology) start(ActorSchedulingService actorScheduler) Methods inherited from class io.camunda.zeebe.scheduler.Actor
buildActorName, call, close, closeAsync, createContext, getContext, handleFailure, isActorClosed, newActor, onActorClosed, onActorCloseRequested, onActorClosing, onActorFailed, onActorStarting, run, runOnCompletion, schedule, 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
-
BrokerTopologyManagerImpl
-
-
Method Details
-
getTopology
- Specified by:
getTopologyin interfaceBrokerTopologyManager- Returns:
- the current known cluster state or null if the topology was not fetched yet
-
setTopology
-
addTopologyListener
Description copied from interface:BrokerTopologyManagerAdds the topology listener. For each existing brokers, the listener will be notified viaBrokerTopologyListener.brokerAdded(MemberId). After that, the listener gets notified of every new broker added or removed events.- Specified by:
addTopologyListenerin interfaceBrokerTopologyManager- Parameters:
listener- the topology listener
-
removeTopologyListener
Description copied from interface:BrokerTopologyManagerRemoves the given topology listener by identity.- Specified by:
removeTopologyListenerin interfaceBrokerTopologyManager- Parameters:
listener- the listener to remove
-
start
-
getName
-
onActorStarted
protected void onActorStarted()- Overrides:
onActorStartedin classActor
-
event
- Specified by:
eventin interfaceEventListener<ClusterMembershipEvent>
-
onClusterTopologyChanged
- Specified by:
onClusterTopologyChangedin interfaceGatewayClusterTopologyService.Listener
-