Class OwnedBundle
- java.lang.Object
-
- org.apache.pulsar.broker.namespace.OwnedBundle
-
public class OwnedBundle extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description OwnedBundle(NamespaceBundle suName)constructor.OwnedBundle(NamespaceBundle suName, boolean active)Constructor to allow set initial active flag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamespaceBundlegetNamespaceBundle()Access to the namespace name.java.util.concurrent.CompletableFuture<java.lang.Void>handleUnloadRequest(PulsarService pulsar, long timeout, java.util.concurrent.TimeUnit timeoutUnit)It unloads the bundle by closing all topics concurrently under this bundle.booleanisActive()Access method to the namespace state to check whether the namespace is active or not.voidsetActive(boolean active)
-
-
-
Constructor Detail
-
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 Detail
-
getNamespaceBundle
public NamespaceBundle getNamespaceBundle()
Access to the namespace name.- Returns:
- NamespaceName
-
handleUnloadRequest
public java.util.concurrent.CompletableFuture<java.lang.Void> handleUnloadRequest(PulsarService pulsar, long timeout, java.util.concurrent.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 topicstimeoutUnit-- Throws:
java.lang.Exception
-
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)
-
-