Interface RmTopicClient

All Known Implementing Classes:
RmTopicClientImpl

public interface RmTopicClient
Client interface for managing topics and deleted topics in the resource manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    CompletableFuture<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 topic, 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.
  • Method Details

    • createTopic

      CompletableFuture<io.confluent.rm.kafka.v1.Topic> createTopic(io.confluent.rm.kafka.v1.Topic topic)
      Creates a new topic in the resource manager.
      Parameters:
      topic - the topic to create
      Returns:
      a CompletableFuture that completes with the created Topic
    • deleteTopic

      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.
      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

      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.
      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

      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.
      Parameters:
      topic - the topic to update
      topicPartitions - 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

      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.
      Parameters:
      topic - the topic to update
      dynamicConfigs - 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

      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.
      Parameters:
      topic - the topic to remove the finalizer from
      finalizer - 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

      RmWatcher<io.confluent.rm.kafka.v1.Topic> topicWatch()
      Creates a watcher for monitoring topic changes in the resource manager.
      Returns:
      a Watcher that notifies of topic creation, modification, and deletion events
    • createDeletedTopic

      CompletableFuture<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.
      Parameters:
      topic - the deleted topic record to create
      Returns:
      a CompletableFuture that completes with the created DeletedTopic
    • deleteDeletedTopic

      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.
      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

      CompletableFuture<Optional<io.confluent.rm.kafka.v1.DeletedTopic>> removeDeletedTopicFinalizer(io.confluent.rm.kafka.v1.DeletedTopic topic, String finalizer)
      Remove a finalizer from a DeletedTopic.
    • deletedTopicWatch

      RmWatcher<io.confluent.rm.kafka.v1.DeletedTopic> deletedTopicWatch()
      Creates a watcher for monitoring deleted topic record changes in the resource manager.
      Returns:
      a Watcher that notifies of deleted topic record creation and removal events
    • updateMirrorTopic

      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.
      Parameters:
      topic - the topic to update with mirror metadata
      mirrorTopicSpec - 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