public interface BucketManager extends AutoCloseable
KeyValueEntity
The BucketManager API is used to create and remove persistent KeyValueEntity.| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes a resource
|
<K> void |
delete(Iterable<K> keys)
Removes entities from keys
|
<K> void |
delete(K key)
Removes an entity from key
|
<K> Iterable<Value> |
get(Iterable<K> keys)
Finds a list of values from keys
|
<K> Optional<Value> |
get(K key)
Finds the Value from a key
|
default KeyValuePreparedStatement |
prepare(String query)
Executes a query and returns the result, when the operations are put, remove and get
command it will return the result of the operation when the command is either remove or put
it will return an empty collection.
|
void |
put(Iterable<KeyValueEntity> entities)
Saves the
Iterable of keys |
void |
put(Iterable<KeyValueEntity> entities,
Duration ttl)
Saves the
Iterable of keys with a defined time to live |
void |
put(KeyValueEntity entity)
Saves the
KeyValueEntity |
void |
put(KeyValueEntity entity,
Duration ttl)
Saves the
KeyValueEntity with time to live |
<K,V> void |
put(K key,
V value)
Associates the specified value with the specified key and than storage
|
default Stream<Value> |
query(String query)
Executes a query and returns the result, when the operations are put, remove and get
command it will return the result of the operation when the command is remove or put
it will return an empty collection.
|
<K,V> void put(K key,
V value)
K - the key typeV - the value typekey - the keyvalue - the valueNullPointerException - when either key or value are nullvoid put(KeyValueEntity entity)
KeyValueEntityentity - the entity to be insertNullPointerException - when entity is nullvoid put(KeyValueEntity entity, Duration ttl)
KeyValueEntity with time to liveentity - the entity to be insertttl - the defined time to liveNullPointerException - when entity is nullUnsupportedOperationException - when expired time is not supportedvoid put(Iterable<KeyValueEntity> entities)
Iterable of keysentities - keys to be insertNullPointerException - when the iterable is nullvoid put(Iterable<KeyValueEntity> entities, Duration ttl)
Iterable of keys with a defined time to liveentities - keys to be insertttl - the time to entity expireNullPointerException - when the iterable is nullUnsupportedOperationException - when expired time is not supported<K> Optional<Value> get(K key)
K - the key typekey - the keyOptional when is not found will return a Optional.empty()NullPointerException - when the key is null<K> Iterable<Value> get(Iterable<K> keys)
K - the key typekeys - the keys to be used in this queryNullPointerException - when either the keys or the entities values are null<K> void delete(K key)
K - the key typekey - the key bo be usedNullPointerException - when the key is null<K> void delete(Iterable<K> keys)
K - the key typekeys - the keys to be usedNullPointerException - when the key is nulldefault Stream<Value> query(String query)
query - the query as StringNullPointerException - when there is parameter nullIllegalArgumentException - when the query has value parametersIllegalStateException - when there is not KeyValueQueryParserQueryException - when there is error in the syntaxdefault KeyValuePreparedStatement prepare(String query)
query - the query as StringKeyValuePreparedStatement instanceNullPointerException - when there is parameter nullIllegalStateException - when there is not KeyValuePreparedStatementQueryException - when there is error in the syntaxvoid close()
close in interface AutoCloseableCopyright © 2017–2019 Eclipse Foundation. All rights reserved.