Class NoopPartitionChangeExecutor
java.lang.Object
io.camunda.zeebe.dynamic.config.changes.NoopPartitionChangeExecutor
- All Implemented Interfaces:
PartitionChangeExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbootstrap(int partitionId, int priority, DynamicPartitionConfig partitionConfig) The implementation of this method must bootstrap the partition with a single replica.disableExporter(int partitionId, String exporterId) Disables the exporter for the given partition.enableExporter(int partitionId, String exporterId, long metadataVersionToUpdate, String initializeFrom) Enables the exporter for the given partition.forceReconfigure(int partitionId, Collection<MemberId> members) Force reconfigure a partition to include only the given members in the replication group.join(int partitionId, Map<MemberId, Integer> membersWithPriority, DynamicPartitionConfig config) The implementation of this method must start the partition on this member.leave(int partitionId) The implementation of this method must remove the member from the replication group of the given partition and stops the partition on this member.reconfigurePriority(int partitionId, int newPriority) Updates the priority of the member used for raft priority election for the given partition.
-
Constructor Details
-
NoopPartitionChangeExecutor
public NoopPartitionChangeExecutor()
-
-
Method Details
-
join
public ActorFuture<Void> join(int partitionId, Map<MemberId, Integer> membersWithPriority, DynamicPartitionConfig config) Description copied from interface:PartitionChangeExecutorThe implementation of this method must start the partition on this member. The partition must join the replication group formed by the members given in themembersWithPriority. The implementation must be idempotent. If the node restarts after this method was called, but before marking the operation as completed, it will be retried after the restart.- Specified by:
joinin interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partitionmembersWithPriority- priority of each replicas used of leader election- Returns:
- a future that completes when the partition is started and joined the replication group
-
leave
Description copied from interface:PartitionChangeExecutorThe implementation of this method must remove the member from the replication group of the given partition and stops the partition on this member. The implementation must be idempotent. If the node restarts after this method was called, but before marking the operation as completed, it will be retried after the restart.- Specified by:
leavein interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partition- Returns:
- a future that completes when the partition is stopped and removed from the replication.
-
bootstrap
public ActorFuture<Void> bootstrap(int partitionId, int priority, DynamicPartitionConfig partitionConfig) Description copied from interface:PartitionChangeExecutorThe implementation of this method must bootstrap the partition with a single replica. The implementation must be idempotent. If the node restarts after this method was called, but before marking the operation as completed, it will be retried after the restart.- Specified by:
bootstrapin interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partitionpriority- priority of the member in the partition used for Raft's priority electionpartitionConfig- the configuration of the partition- Returns:
- a future that completes when the partition is bootstrapped
-
reconfigurePriority
Description copied from interface:PartitionChangeExecutorUpdates the priority of the member used for raft priority election for the given partition.- Specified by:
reconfigurePriorityin interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partitionnewPriority- new priority value- Returns:
- a future that completes when the priority is updated
-
forceReconfigure
Description copied from interface:PartitionChangeExecutorForce reconfigure a partition to include only the given members in the replication group.- Specified by:
forceReconfigurein interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partitionmembers- members that will be part of the replication group after reconfiguring- Returns:
- a future that completes when the partition is reconfigured
-
disableExporter
Description copied from interface:PartitionChangeExecutorDisables the exporter for the given partition.- Specified by:
disableExporterin interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partitionexporterId- id of the exporter to disable- Returns:
- a future that completes when the exporter is disabled
-
enableExporter
public ActorFuture<Void> enableExporter(int partitionId, String exporterId, long metadataVersionToUpdate, String initializeFrom) Description copied from interface:PartitionChangeExecutorEnables the exporter for the given partition.- Specified by:
enableExporterin interfacePartitionChangeExecutor- Parameters:
partitionId- id of the partitionexporterId- id of the exporter to enablemetadataVersionToUpdate- the version of the metadata to set in the exporter stateinitializeFrom- the id of another exporter to initialize metadata from. Can be null.- Returns:
- a future that completes when the exporter is enabled
-