Class RmTopicClientImpl
java.lang.Object
io.confluent.rm.kafka.v1.RmTopicClientImpl
- All Implemented Interfaces:
RmTopicClient
Convenience wrapper around a
Client. This class is stateless and does not
need to be closed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<io.confluent.rm.kafka.v1.DeletedTopic> createDeletedTopic(io.confluent.rm.kafka.v1.DeletedTopic topic) Creates a deleted topic record to track the deletion of a topic.CompletableFuture<io.confluent.rm.kafka.v1.Topic> createTopic(io.confluent.rm.kafka.v1.Topic topic) Creates a new topic in the resource manager.CompletableFuture<Optional<io.confluent.rm.kafka.v1.DeletedTopic>> deleteDeletedTopic(io.confluent.resourcemanager.api.model.identifier.ObjectIdentifier<io.confluent.rm.kafka.v1.DeletedTopic> id) Removes a deleted topic record from the resource manager.RmWatcher<io.confluent.rm.kafka.v1.DeletedTopic> Creates a watcher for monitoring deleted topic record changes in the resource manager.CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> deleteTopic(io.confluent.resourcemanager.api.model.identifier.ObjectIdentifier<io.confluent.rm.kafka.v1.Topic> id) Deletes a topic from the resource manager.CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> getTopic(io.confluent.resourcemanager.api.model.identifier.ObjectIdentifier<io.confluent.rm.kafka.v1.Topic> id) Retrieves a topic from the resource manager.CompletableFuture<Optional<io.confluent.rm.kafka.v1.DeletedTopic>> removeDeletedTopicFinalizer(io.confluent.rm.kafka.v1.DeletedTopic deletedTopic, String finalizer) Remove a finalizer from a DeletedTopic.CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> removeFinalizer(io.confluent.rm.kafka.v1.Topic topic, String finalizer) Removes a finalizer from a topic, allowing it to be deleted when all finalizers are removed.RmWatcher<io.confluent.rm.kafka.v1.Topic> Creates a watcher for monitoring topic changes in the resource manager.CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> updateDynamicConfigs(io.confluent.rm.kafka.v1.Topic topic, io.confluent.rm.kafka.v1.DynamicConfigs dynamicConfigs) Updates the dynamic configuration settings for an existing topic.CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> updateMirrorTopic(io.confluent.rm.kafka.v1.Topic topic, io.confluent.rm.kafka.v1.MirrorTopicSpec mirrorTopicSpec, io.confluent.rm.kafka.v1.MirrorTopicStatus mirrorTopicStatus, List<Integer> k2LeaderEpochs) Updates the mirror metadata for a topic.CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> updateTopicPartitions(io.confluent.rm.kafka.v1.Topic topic, io.confluent.rm.kafka.v1.Partitions topicPartitions) Updates the partition configuration for an existing topic.
-
Constructor Details
-
RmTopicClientImpl
-
-
Method Details
-
createTopic
public CompletableFuture<io.confluent.rm.kafka.v1.Topic> createTopic(io.confluent.rm.kafka.v1.Topic topic) Description copied from interface:RmTopicClientCreates a new topic in the resource manager.- Specified by:
createTopicin interfaceRmTopicClient- Parameters:
topic- the topic to create- Returns:
- a CompletableFuture that completes with the created Topic
-
deleteTopic
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> deleteTopic(io.confluent.resourcemanager.api.model.identifier.ObjectIdentifier<io.confluent.rm.kafka.v1.Topic> id) Description copied from interface:RmTopicClientDeletes a topic from the resource manager.- Specified by:
deleteTopicin interfaceRmTopicClient- Parameters:
id- the identifier of the topic to delete- Returns:
- a CompletableFuture that completes with an Optional containing the deleted Topic, or empty if the topic was not found
-
getTopic
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> getTopic(io.confluent.resourcemanager.api.model.identifier.ObjectIdentifier<io.confluent.rm.kafka.v1.Topic> id) Description copied from interface:RmTopicClientRetrieves a topic from the resource manager.- Specified by:
getTopicin interfaceRmTopicClient- Parameters:
id- the identifier of the topic to retrieve- Returns:
- a CompletableFuture that completes with an Optional containing the Topic, or empty if the topic was not found
-
updateTopicPartitions
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> updateTopicPartitions(io.confluent.rm.kafka.v1.Topic topic, io.confluent.rm.kafka.v1.Partitions topicPartitions) Description copied from interface:RmTopicClientUpdates the partition configuration for an existing topic.- Specified by:
updateTopicPartitionsin interfaceRmTopicClient- Parameters:
topic- the topic to updatetopicPartitions- the new partition configuration- Returns:
- a CompletableFuture that completes with an Optional containing the updated Topic, or empty if the topic was not found
-
updateDynamicConfigs
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> updateDynamicConfigs(io.confluent.rm.kafka.v1.Topic topic, io.confluent.rm.kafka.v1.DynamicConfigs dynamicConfigs) Description copied from interface:RmTopicClientUpdates the dynamic configuration settings for an existing topic.- Specified by:
updateDynamicConfigsin interfaceRmTopicClient- Parameters:
topic- the topic to updatedynamicConfigs- the new dynamic configuration settings- Returns:
- a CompletableFuture that completes with an Optional containing the updated Topic, or empty if the topic was not found
-
removeFinalizer
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> removeFinalizer(io.confluent.rm.kafka.v1.Topic topic, String finalizer) Description copied from interface:RmTopicClientRemoves a finalizer from a topic, allowing it to be deleted when all finalizers are removed.- Specified by:
removeFinalizerin interfaceRmTopicClient- Parameters:
topic- the topic to remove the finalizer fromfinalizer- the name of the finalizer to remove- Returns:
- a CompletableFuture that completes with an Optional containing the updated Topic, or empty if the topic was not found
-
topicWatch
Description copied from interface:RmTopicClientCreates a watcher for monitoring topic changes in the resource manager.- Specified by:
topicWatchin interfaceRmTopicClient- Returns:
- a Watcher that notifies of topic creation, modification, and deletion events
-
createDeletedTopic
public CompletableFuture<io.confluent.rm.kafka.v1.DeletedTopic> createDeletedTopic(io.confluent.rm.kafka.v1.DeletedTopic topic) Description copied from interface:RmTopicClientCreates a deleted topic record to track the deletion of a topic.- Specified by:
createDeletedTopicin interfaceRmTopicClient- Parameters:
topic- the deleted topic record to create- Returns:
- a CompletableFuture that completes with the created DeletedTopic
-
deleteDeletedTopic
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.DeletedTopic>> deleteDeletedTopic(io.confluent.resourcemanager.api.model.identifier.ObjectIdentifier<io.confluent.rm.kafka.v1.DeletedTopic> id) Description copied from interface:RmTopicClientRemoves a deleted topic record from the resource manager.- Specified by:
deleteDeletedTopicin interfaceRmTopicClient- Parameters:
id- the identifier of the deleted topic record to remove- Returns:
- a CompletableFuture that completes with an Optional containing the removed DeletedTopic, or empty if the deleted topic record was not found
-
removeDeletedTopicFinalizer
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.DeletedTopic>> removeDeletedTopicFinalizer(io.confluent.rm.kafka.v1.DeletedTopic deletedTopic, String finalizer) Description copied from interface:RmTopicClientRemove a finalizer from a DeletedTopic.- Specified by:
removeDeletedTopicFinalizerin interfaceRmTopicClient
-
deletedTopicWatch
Description copied from interface:RmTopicClientCreates a watcher for monitoring deleted topic record changes in the resource manager.- Specified by:
deletedTopicWatchin interfaceRmTopicClient- Returns:
- a Watcher that notifies of deleted topic record creation and removal events
-
updateMirrorTopic
public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> updateMirrorTopic(io.confluent.rm.kafka.v1.Topic topic, io.confluent.rm.kafka.v1.MirrorTopicSpec mirrorTopicSpec, io.confluent.rm.kafka.v1.MirrorTopicStatus mirrorTopicStatus, List<Integer> k2LeaderEpochs) Description copied from interface:RmTopicClientUpdates the mirror metadata for a topic.- Specified by:
updateMirrorTopicin interfaceRmTopicClient- Parameters:
topic- the topic to update with mirror metadatamirrorTopicSpec- the mirror topic spec to apply to the topic. If it is null, the mirror topic spec will be removed.mirrorTopicStatus- the mirror topic status to apply to the topic. If it is null, the mirror topic status will be removed.- Returns:
- a CompletableFuture that completes with an Optional containing the updated Topic, or empty if the topic was not found
-