T - type of configuration-resources.public class BaseResources<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
BASE_CLUSTERS_PATH |
protected static String |
BASE_POLICIES_PATH |
protected static String |
LOCAL_POLICIES_ROOT |
| Constructor and Description |
|---|
BaseResources(MetadataStore store,
Class<T> clazz,
int operationTimeoutSec) |
BaseResources(MetadataStore store,
com.fasterxml.jackson.core.type.TypeReference<T> typeRef,
int operationTimeoutSec) |
protected static final String BASE_POLICIES_PATH
protected static final String BASE_CLUSTERS_PATH
protected static final String LOCAL_POLICIES_ROOT
public BaseResources(MetadataStore store, Class<T> clazz, int operationTimeoutSec)
public BaseResources(MetadataStore store, com.fasterxml.jackson.core.type.TypeReference<T> typeRef, int operationTimeoutSec)
protected List<String> getChildren(String path) throws MetadataStoreException
MetadataStoreExceptionprotected CompletableFuture<List<String>> getChildrenAsync(String path)
protected Optional<T> get(String path) throws MetadataStoreException
MetadataStoreExceptionprotected CompletableFuture<Optional<T>> getAsync(String path)
protected void set(String path, Function<T,T> modifyFunction) throws MetadataStoreException
MetadataStoreExceptionprotected void setWithCreate(String path, Function<Optional<T>,T> createFunction) throws MetadataStoreException
MetadataStoreExceptionprotected CompletableFuture<Void> setWithCreateAsync(String path, Function<Optional<T>,T> createFunction)
protected void create(String path, T data) throws MetadataStoreException
MetadataStoreExceptionprotected CompletableFuture<Void> createAsync(String path, T data)
protected void delete(String path) throws MetadataStoreException
MetadataStoreExceptionprotected CompletableFuture<Void> deleteAsync(String path)
protected CompletableFuture<Void> deleteIfExistsAsync(String path)
protected boolean exists(String path) throws MetadataStoreException
MetadataStoreExceptionprotected CompletableFuture<Boolean> existsAsync(String path)
public int getOperationTimeoutSec()
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.