Class OwnedBundle

java.lang.Object
org.apache.pulsar.broker.namespace.OwnedBundle

public class OwnedBundle extends Object
  • Constructor Details

    • OwnedBundle

      public OwnedBundle(NamespaceBundle suName)
      constructor.
      Parameters:
      suName -
    • OwnedBundle

      public OwnedBundle(NamespaceBundle suName, boolean active)
      Constructor to allow set initial active flag.
      Parameters:
      suName -
      active -
  • Method Details

    • getNamespaceBundle

      public NamespaceBundle getNamespaceBundle()
      Access to the namespace name.
      Returns:
      NamespaceName
    • handleUnloadRequest

      public CompletableFuture<Void> handleUnloadRequest(PulsarService pulsar, long timeout, TimeUnit timeoutUnit)
      It unloads the bundle by closing all topics concurrently under this bundle.
       a. disable bundle ownership in memory and not in zk
       b. close all the topics concurrently
       c. delete ownership znode from zookeeper.
       
      Parameters:
      pulsar -
      timeout - timeout for unloading bundle. It doesn't throw exception if it times out while waiting on closing all topics
      timeoutUnit -
      Throws:
      Exception
    • handleUnloadRequest

      public CompletableFuture<Void> handleUnloadRequest(PulsarService pulsar, long timeout, TimeUnit timeoutUnit, boolean closeWithoutWaitingClientDisconnect)
    • isActive

      public boolean isActive()
      Access method to the namespace state to check whether the namespace is active or not.
      Returns:
      boolean value indicate that the namespace is active or not.
    • setActive

      public void setActive(boolean active)