public class ClusterResources extends BaseResources<org.apache.pulsar.common.policies.data.ClusterData>
| Modifier and Type | Class and Description |
|---|---|
static class |
ClusterResources.FailureDomainResources |
BASE_CLUSTERS_PATH, BASE_POLICIES_PATH| Constructor and Description |
|---|
ClusterResources(MetadataStore store,
int operationTimeoutSec) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clusterExists(String clusterName) |
CompletableFuture<Boolean> |
clusterExistsAsync(String clusterName) |
static String |
clusterNameFromPath(String path) |
void |
createCluster(String clusterName,
org.apache.pulsar.common.policies.data.ClusterData clusterData) |
void |
deleteCluster(String clusterName) |
Optional<org.apache.pulsar.common.policies.data.ClusterData> |
getCluster(String clusterName) |
CompletableFuture<Optional<org.apache.pulsar.common.policies.data.ClusterData>> |
getClusterAsync(String clusterName) |
List<String> |
getNamespacesForCluster(String tenant,
String clusterName) |
boolean |
isClusterUsed(String clusterName) |
Set<String> |
list() |
CompletableFuture<Set<String>> |
listAsync() |
static boolean |
pathRepresentsClusterName(String path) |
void |
updateCluster(String clusterName,
Function<org.apache.pulsar.common.policies.data.ClusterData,org.apache.pulsar.common.policies.data.ClusterData> modifyFunction) |
create, createAsync, delete, deleteAsync, deleteIfExistsAsync, exists, existsAsync, get, getAsync, getChildren, getChildrenAsync, getOperationTimeoutSec, joinPath, set, setAsync, setWithCreate, setWithCreateAsyncpublic ClusterResources(MetadataStore store, int operationTimeoutSec)
public CompletableFuture<Set<String>> listAsync()
public Set<String> list() throws MetadataStoreException
MetadataStoreExceptionpublic Optional<org.apache.pulsar.common.policies.data.ClusterData> getCluster(String clusterName) throws MetadataStoreException
MetadataStoreExceptionpublic CompletableFuture<Optional<org.apache.pulsar.common.policies.data.ClusterData>> getClusterAsync(String clusterName)
public List<String> getNamespacesForCluster(String tenant, String clusterName) throws MetadataStoreException
MetadataStoreExceptionpublic void createCluster(String clusterName, org.apache.pulsar.common.policies.data.ClusterData clusterData) throws MetadataStoreException
MetadataStoreExceptionpublic void updateCluster(String clusterName, Function<org.apache.pulsar.common.policies.data.ClusterData,org.apache.pulsar.common.policies.data.ClusterData> modifyFunction) throws MetadataStoreException
MetadataStoreExceptionpublic void deleteCluster(String clusterName) throws MetadataStoreException
MetadataStoreExceptionpublic boolean isClusterUsed(String clusterName) throws MetadataStoreException
MetadataStoreExceptionpublic boolean clusterExists(String clusterName) throws MetadataStoreException
MetadataStoreExceptionpublic CompletableFuture<Boolean> clusterExistsAsync(String clusterName)
public static boolean pathRepresentsClusterName(String path)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.