Class ConfigurationChangeCoordinatorImpl
java.lang.Object
io.camunda.zeebe.dynamic.config.changes.ConfigurationChangeCoordinatorImpl
- All Implemented Interfaces:
ConfigurationChangeCoordinator
public class ConfigurationChangeCoordinatorImpl
extends Object
implements ConfigurationChangeCoordinator
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.dynamic.config.changes.ConfigurationChangeCoordinator
ConfigurationChangeCoordinator.ConfigurationChangeRequest, ConfigurationChangeCoordinator.ConfigurationChangeResult -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationChangeCoordinatorImpl(ClusterConfigurationManager clusterTopologyManager, MemberId localMemberId, ConcurrencyControl executor) -
Method Summary
Modifier and TypeMethodDescriptionApplies the operations generated by the requestTransformer to the current cluster configuration.cancelChange(long changeId) Cancels a configuration change.Simulates the operations generated by the request transformer on the current cluster configuration.
-
Constructor Details
-
ConfigurationChangeCoordinatorImpl
public ConfigurationChangeCoordinatorImpl(ClusterConfigurationManager clusterTopologyManager, MemberId localMemberId, ConcurrencyControl executor)
-
-
Method Details
-
getClusterConfiguration
- Specified by:
getClusterConfigurationin interfaceConfigurationChangeCoordinator- Returns:
- the current cluster configuration.
-
applyOperations
public ActorFuture<ConfigurationChangeCoordinator.ConfigurationChangeResult> applyOperations(ConfigurationChangeCoordinator.ConfigurationChangeRequest request) Description copied from interface:ConfigurationChangeCoordinatorApplies the operations generated by the requestTransformer to the current cluster configuration. If no operations is returned by requestTransformer, the future completes successfully with no change to the cluster configuration.- Specified by:
applyOperationsin interfaceConfigurationChangeCoordinator- Parameters:
request- the request transformer that generates the operations to apply- Returns:
- a future which is completed when the configuration change has started successfully.
-
simulateOperations
public ActorFuture<ConfigurationChangeCoordinator.ConfigurationChangeResult> simulateOperations(ConfigurationChangeCoordinator.ConfigurationChangeRequest request) Description copied from interface:ConfigurationChangeCoordinatorSimulates the operations generated by the request transformer on the current cluster configuration. Operations are not applied and the current cluster configuration remains unchanged.- Specified by:
simulateOperationsin interfaceConfigurationChangeCoordinator- Parameters:
request- the request transformer that generates the operations to simulate- Returns:
- a future which is completed with the results of the simulation or an exception describing why the operations are not valid.
-
cancelChange
Description copied from interface:ConfigurationChangeCoordinatorCancels a configuration change. This is an unsafe operation and should be called only when the operation is stuck and cannot make progress on its own. When a change is cancelled, already applied operations are not reverted. So the ClusterConfiguration will be in an intermediate state with partially applied operations.- Specified by:
cancelChangein interfaceConfigurationChangeCoordinator- Parameters:
changeId- the id of the change to cancel- Returns:
- a future which is completed when the change has been cancelled successfully.
-