Class RmTopicClientImpl

java.lang.Object
io.confluent.rm.kafka.v1.RmTopicClientImpl
All Implemented Interfaces:
RmTopicClient

public class RmTopicClientImpl extends Object implements RmTopicClient
Convenience wrapper around a Client. This class is stateless and does not need to be closed.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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 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.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RmTopicClientImpl

      public RmTopicClientImpl(RmClient client)
  • Method Details

    • createTopic

      public CompletableFuture<io.confluent.rm.kafka.v1.Topic> createTopic(io.confluent.rm.kafka.v1.Topic topic)
      Description copied from interface: RmTopicClient
      Creates a new topic in the resource manager.
      Specified by:
      createTopic in interface RmTopicClient
      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: RmTopicClient
      Deletes a topic from the resource manager.
      Specified by:
      deleteTopic in interface RmTopicClient
      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: RmTopicClient
      Retrieves a topic from the resource manager.
      Specified by:
      getTopic in interface RmTopicClient
      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: RmTopicClient
      Updates the partition configuration for an existing topic.
      Specified by:
      updateTopicPartitions in interface RmTopicClient
      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

      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: RmTopicClient
      Updates the dynamic configuration settings for an existing topic.
      Specified by:
      updateDynamicConfigs in interface RmTopicClient
      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

      public CompletableFuture<Optional<io.confluent.rm.kafka.v1.Topic>> removeFinalizer(io.confluent.rm.kafka.v1.Topic topic, String finalizer)
      Description copied from interface: RmTopicClient
      Removes a finalizer from a topic, allowing it to be deleted when all finalizers are removed.
      Specified by:
      removeFinalizer in interface RmTopicClient
      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

      public RmWatcher<io.confluent.rm.kafka.v1.Topic> topicWatch()
      Description copied from interface: RmTopicClient
      Creates a watcher for monitoring topic changes in the resource manager.
      Specified by:
      topicWatch in interface RmTopicClient
      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: RmTopicClient
      Creates a deleted topic record to track the deletion of a topic.
      Specified by:
      createDeletedTopic in interface RmTopicClient
      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: RmTopicClient
      Removes a deleted topic record from the resource manager.
      Specified by:
      deleteDeletedTopic in interface RmTopicClient
      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: RmTopicClient
      Remove a finalizer from a DeletedTopic.
      Specified by:
      removeDeletedTopicFinalizer in interface RmTopicClient
    • deletedTopicWatch

      public RmWatcher<io.confluent.rm.kafka.v1.DeletedTopic> deletedTopicWatch()
      Description copied from interface: RmTopicClient
      Creates a watcher for monitoring deleted topic record changes in the resource manager.
      Specified by:
      deletedTopicWatch in interface RmTopicClient
      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: RmTopicClient
      Updates the mirror metadata for a topic.
      Specified by:
      updateMirrorTopic in interface RmTopicClient
      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