Class OwnedBundle
java.lang.Object
org.apache.pulsar.broker.namespace.OwnedBundle
-
Constructor Summary
ConstructorsConstructorDescriptionOwnedBundle(NamespaceBundle suName) constructor.OwnedBundle(NamespaceBundle suName, boolean active) Constructor to allow set initial active flag. -
Method Summary
Modifier and TypeMethodDescriptionAccess to the namespace name.handleUnloadRequest(PulsarService pulsar, long timeout, TimeUnit timeoutUnit) It unloads the bundle by closing all topics concurrently under this bundle.handleUnloadRequest(PulsarService pulsar, long timeout, TimeUnit timeoutUnit, boolean closeWithoutWaitingClientDisconnect) booleanisActive()Access method to the namespace state to check whether the namespace is active or not.voidsetActive(boolean active)
-
Constructor Details
-
OwnedBundle
constructor.- Parameters:
suName-
-
OwnedBundle
Constructor to allow set initial active flag.- Parameters:
suName-active-
-
-
Method Details
-
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 topicstimeoutUnit-- 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)
-