Class BrokerTopologyManagerImpl
java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.broker.client.impl.BrokerTopologyManagerImpl
- All Implemented Interfaces:
ClusterMembershipEventListener,EventFilter<ClusterMembershipEvent>,EventListener<ClusterMembershipEvent>,BrokerTopologyManager,ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener,AsyncClosable,ConcurrencyControl,AutoCloseable,Executor
public final class BrokerTopologyManagerImpl
extends Actor
implements BrokerTopologyManager, ClusterMembershipEventListener, ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
-
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) Returns the current cluster topology.getName()Returns live topology that includes which brokers are available, who is leader for each partition, etc.protected voidvoidonClusterConfigurationUpdated(ClusterConfiguration clusterTopology) voidremoveTopologyListener(BrokerTopologyListener listener) Removes the given topology listener by identity.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, 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, createFuture, executeMethods inherited from interface io.atomix.utils.event.EventFilter
isRelevant
-
Constructor Details
-
BrokerTopologyManagerImpl
-
-
Method Details
-
getTopology
Description copied from interface:BrokerTopologyManagerReturns live topology that includes which brokers are available, who is leader for each partition, etc.- Specified by:
getTopologyin interfaceBrokerTopologyManager- Returns:
- a copy of the currently known topology
-
getClusterConfiguration
Description copied from interface:BrokerTopologyManagerReturns the current cluster topology. The topology contains the information about brokers which are part of the cluster, and the partition distribution. UnlikeBrokerClusterStatethis also includes information about brokers which are currently unreachable.- Specified by:
getClusterConfigurationin interfaceBrokerTopologyManager
-
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
-
getName
-
onActorStarted
protected void onActorStarted()- Overrides:
onActorStartedin classActor
-
event
- Specified by:
eventin interfaceEventListener<ClusterMembershipEvent>
-
onClusterConfigurationUpdated
- Specified by:
onClusterConfigurationUpdatedin interfaceClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
-