Storage.Wrap
Constructor and Description |
---|
LoggingStorage(Level level,
Storage storage)
Ctor.
|
LoggingStorage(Storage storage)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
delete(Key key)
Removes value from storage.
|
<T> CompletionStage<T> |
exclusively(Key key,
Function<Storage,CompletionStage<T>> operation)
Runs operation exclusively for specified key.
|
CompletableFuture<Boolean> |
exists(Key key)
This file exists?
|
CompletableFuture<Collection<Key>> |
list(Key prefix)
Return the list of keys that start with this prefix, for
example "foo/bar/".
|
CompletableFuture<Void> |
move(Key source,
Key destination)
Moves value from one location to another.
|
CompletableFuture<Void> |
save(Key key,
Content content)
Saves the bytes to the specified key.
|
CompletableFuture<Long> |
size(Key key)
Get value size.
|
CompletableFuture<Content> |
value(Key key)
Obtain bytes by key.
|
public LoggingStorage(Storage storage)
storage
- Delegate storage.public CompletableFuture<Boolean> exists(Key key)
Storage
public CompletableFuture<Collection<Key>> list(Key prefix)
Storage
public CompletableFuture<Void> save(Key key, Content content)
Storage
public CompletableFuture<Void> move(Key source, Key destination)
Storage
public CompletableFuture<Long> size(Key key)
Storage
public CompletableFuture<Content> value(Key key)
Storage
public CompletableFuture<Void> delete(Key key)
Storage
public <T> CompletionStage<T> exclusively(Key key, Function<Storage,CompletionStage<T>> operation)
Storage
exclusively
in interface Storage
T
- Operation result type.key
- Key which is scope of operation.operation
- Operation to be performed exclusively.Copyright © 2019–2021 jcabi.com. All rights reserved.