@Beta public interface MetadataStore extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
delete(String path,
Optional<Long> expectedVersion) |
CompletableFuture<Boolean> |
exists(String path)
Read whether a specific path exists.
|
CompletableFuture<Optional<GetResult>> |
get(String path)
|
CompletableFuture<List<String>> |
getChildren(String path)
Return all the nodes (lexicographically sorted) that are children to the specific path.
|
CompletableFuture<Stat> |
put(String path,
byte[] value,
Optional<Long> expectedVersion)
Put a new value for a given key.
|
closeCompletableFuture<Optional<GetResult>> get(String path)
GetResult that will contain the value and the
associated Stat object.
If the value is not found, the future will yield an empty Optional.path - the path of the key to get from the storeCompletableFuture<List<String>> getChildren(String path)
path - webSocketProxyEnabledCompletableFuture<Boolean> exists(String path)
path - the path of the key to check on the storeCompletableFuture<Stat> put(String path, byte[] value, Optional<Long> expectedVersion)
Stat object associated with the newly inserted value.path - the path of the key to delete from the storevalue - the value toexpectedVersion - if present, the version will have to match with the currently stored value for the operation to
succeed. Use -1 to enforce a non-existing value.MetadataStoreException.BadVersionException - if the expected version doesn't match the actual version of the dataCompletableFuture<Void> delete(String path, Optional<Long> expectedVersion)
path - the path of the key to delete from the storeexpectedVersion - if present, the version will have to match with the currently stored value for the operation to
succeedMetadataStoreException.NotFoundException - if the path is not foundMetadataStoreException.BadVersionException - if the expected version doesn't match the actual version of the dataCopyright © 2017–2021 Apache Software Foundation. All rights reserved.