public class OwnedBundle extends Object
| Constructor and Description |
|---|
OwnedBundle(NamespaceBundle suName)
constructor
|
OwnedBundle(NamespaceBundle suName,
boolean active)
Constructor to allow set initial active flag
|
| Modifier and Type | Method and Description |
|---|---|
NamespaceBundle |
getNamespaceBundle()
Access to the namespace name
|
CompletableFuture<Void> |
handleUnloadRequest(PulsarService pulsar,
long timeout,
TimeUnit timeoutUnit)
It unloads the bundle by closing all topics concurrently under this bundle.
|
boolean |
isActive()
Access method to the namespace state to check whether the namespace is active or not
|
void |
setActive(boolean active) |
public OwnedBundle(NamespaceBundle suName)
suName - public OwnedBundle(NamespaceBundle suName, boolean active)
suName - active - public NamespaceBundle getNamespaceBundle()
public CompletableFuture<Void> handleUnloadRequest(PulsarService pulsar, long timeout, TimeUnit timeoutUnit)
a. disable bundle ownership in memory and not in zk b. close all the topics concurrently c. delete ownership znode from zookeeper.
pulsar - timeout - timeout for unloading bundle. It doesn't throw exception if it times out while waiting on closing all
topicstimeoutUnit - Exceptionpublic boolean isActive()
public void setActive(boolean active)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.