Class TopicPoliciesService.TopicPoliciesServiceDisabled

java.lang.Object
org.apache.pulsar.broker.service.TopicPoliciesService.TopicPoliciesServiceDisabled
All Implemented Interfaces:
AutoCloseable, TopicPoliciesService
Enclosing interface:
TopicPoliciesService

public static class TopicPoliciesService.TopicPoliciesServiceDisabled extends Object implements TopicPoliciesService
  • Constructor Details

    • TopicPoliciesServiceDisabled

      public TopicPoliciesServiceDisabled()
  • Method Details

    • deleteTopicPoliciesAsync

      public CompletableFuture<Void> deleteTopicPoliciesAsync(org.apache.pulsar.common.naming.TopicName topicName)
      Description copied from interface: TopicPoliciesService
      Delete policies for a topic asynchronously.
      Specified by:
      deleteTopicPoliciesAsync in interface TopicPoliciesService
      Parameters:
      topicName - topic name
    • updateTopicPoliciesAsync

      public CompletableFuture<Void> updateTopicPoliciesAsync(org.apache.pulsar.common.naming.TopicName topicName, org.apache.pulsar.common.policies.data.TopicPolicies policies)
      Description copied from interface: TopicPoliciesService
      Update policies for a topic asynchronously.
      Specified by:
      updateTopicPoliciesAsync in interface TopicPoliciesService
      Parameters:
      topicName - topic name
      policies - policies for the topic name
    • getTopicPoliciesAsync

      public CompletableFuture<Optional<org.apache.pulsar.common.policies.data.TopicPolicies>> getTopicPoliciesAsync(org.apache.pulsar.common.naming.TopicName topicName, TopicPoliciesService.GetType type)
      Description copied from interface: TopicPoliciesService
      Retrieve the topic policies.
      Specified by:
      getTopicPoliciesAsync in interface TopicPoliciesService
    • registerListener

      public boolean registerListener(org.apache.pulsar.common.naming.TopicName topicName, TopicPolicyListener listener)
      Description copied from interface: TopicPoliciesService
      Registers a listener for topic policies updates.

      The listener will receive the latest topic policies when they are updated. If the policies are removed, the listener will receive a null value. Note that not every update is guaranteed to trigger the listener. For instance, if the policies change from A -> B -> null -> C in quick succession, only the final state (C) is guaranteed to be received by the listener. In summary, the listener is guaranteed to receive only the latest value.

      Specified by:
      registerListener in interface TopicPoliciesService
      Returns:
      true if the listener is registered successfully
    • unregisterListener

      public void unregisterListener(org.apache.pulsar.common.naming.TopicName topicName, TopicPolicyListener listener)
      Description copied from interface: TopicPoliciesService
      Unregister the topic policies listener.
      Specified by:
      unregisterListener in interface TopicPoliciesService