public interface Objects
| Modifier and Type | Method and Description |
|---|---|
void |
create(String namespace)
Create a new namespace.
|
default void |
delete(String namespace,
Collection<String> keys)
Delete batch of objects.
|
boolean |
delete(String namespace,
String key)
Delete the object; return true if object was found and removed successfully, false otherwise.
|
void |
drop(String namespace)
Drop a namespace.
|
default Map<String,byte[]> |
get(String namespace,
Collection<String> keys)
Returns batch of key/values for the list of entries.
|
byte[] |
get(String namespace,
String key)
Returns bytes associated to the given key.
|
Collection<String> |
keys(String namespace,
int start,
int count)
Returns paginated list of entries; the returned list is not ordered.
|
Collection<String> |
namespaces()
Get list of all namespaces.
|
int |
size(String namespace)
Returns number of key/value pairs in the given namespace.
|
default void |
store(String namespace,
Map<String,byte[]> batch)
Stores batch of key/value pairs.
|
void |
store(String namespace,
String key,
byte[] bytes)
Stores bytes for the given key.
|
Collection<String> namespaces() throws IOException
IOException - exception thrown from the underlying storage implementationvoid create(String namespace) throws IOException
namespace - the namespace identifierIOException - exception thrown from the underlying storage implementationvoid drop(String namespace) throws IOException
namespace - the namespace identifierIOException - exception thrown from the underlying storage implementationvoid store(String namespace, String key, byte[] bytes) throws IOException
namespace - the namespace identifierkey - the keybytes - the value in bytesIOException - exception thrown from the underlying storage implementationdefault void store(String namespace, Map<String,byte[]> batch) throws IOException
namespace - the namespace identifierbatch - batch of key/value pairsIOException - exception thrown from the underlying storage implementationbyte[] get(String namespace, String key) throws IOException
namespace - the namespace identifierkey - the keyIOException - exception thrown from the underlying storage implementationdefault Map<String,byte[]> get(String namespace, Collection<String> keys) throws IOException
namespace - the namespace identifierkeys - batch of keysIOException - exception thrown from the underlying storage implementationboolean delete(String namespace, String key) throws IOException
namespace - the namespace identifierkey - the keyIOException - exception thrown from the underlying storage implementationdefault void delete(String namespace, Collection<String> keys) throws IOException
namespace - the namespace identifierkeys - batch of keysIOException - exception thrown from the underlying storage implementationCollection<String> keys(String namespace, int start, int count) throws IOException
namespace - the namespace identifierstart - start offsetcount - maximum number of entries to return; -1 for infiniteIOException - exception thrown from the underlying storage implementationint size(String namespace) throws IOException
namespace - the namespace identifierIOException - exception thrown from the underlying storage implementationCopyright © 2019. All rights reserved.