public class BlockingStorage extends Object
Storage.| Constructor and Description |
|---|
BlockingStorage(Storage storage)
Wrap a
Storage in order get a blocking version of it. |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Key key)
Removes value from storage.
|
boolean |
exists(Key key)
This file exists?
|
Collection<Key> |
list(Key prefix)
Return the list of keys that start with this prefix, for
example "foo/bar/".
|
void |
move(Key source,
Key destination)
Moves value from one location to another.
|
void |
save(Key key,
byte[] content)
Save the content.
|
long |
size(Key key)
Get value size.
|
byte[] |
value(Key key)
Obtain value for the specified key.
|
public boolean exists(Key key) throws InterruptedException
key - The key (file name)InterruptedException - If thread was interruptedpublic Collection<Key> list(Key prefix) throws InterruptedException
prefix - The prefix.InterruptedException - If thread was interruptedpublic void save(Key key, byte[] content) throws InterruptedException
key - The keycontent - The contentInterruptedException - If thread was interruptedpublic void move(Key source, Key destination) throws InterruptedException
source - Source key.destination - Destination key.InterruptedException - If thread was interruptedpublic long size(Key key) throws InterruptedException
key - The key of value.InterruptedException - If thread was interruptedpublic byte[] value(Key key) throws InterruptedException
key - The keyInterruptedException - If thread was interruptedpublic void delete(Key key) throws InterruptedException
key - Key for value to be deleted.InterruptedException - If thread was interruptedCopyright © 2019–2020 jcabi.com. All rights reserved.