public interface KeyValueAdapter extends DisposableBean
KeyValueAdapter
unifies access and shields the underlying key/value specific implementation.Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all objects.
|
boolean |
contains(Serializable id,
Serializable keyspace)
Check if a object with given id exists in keyspace.
|
long |
count(KeyValueQuery<?> query,
Serializable keyspace)
Count all matching objects within keyspace.
|
long |
count(Serializable keyspace)
Count number of objects within keyspace.
|
Object |
delete(Serializable id,
Serializable keyspace)
Delete and return the obect with given type and id.
|
<T> T |
delete(Serializable id,
Serializable keyspace,
Class<T> type) |
void |
deleteAllOf(Serializable keyspace)
Remove all objects of given type.
|
CloseableIterator<Map.Entry<Serializable,Object>> |
entries(Serializable keyspace)
Returns a
CloseableIterator that iterates over all entries. |
Iterable<?> |
find(KeyValueQuery<?> query,
Serializable keyspace)
Find all matching objects within keyspace.
|
<T> Iterable<T> |
find(KeyValueQuery<?> query,
Serializable keyspace,
Class<T> type) |
Object |
get(Serializable id,
Serializable keyspace)
Get the object with given id from keyspace.
|
<T> T |
get(Serializable id,
Serializable keyspace,
Class<T> type) |
Iterable<?> |
getAllOf(Serializable keyspace)
Get all elements for given keyspace.
|
Object |
put(Serializable id,
Object item,
Serializable keyspace)
Add object with given id to keyspace.
|
destroy
Object put(Serializable id, Object item, Serializable keyspace)
id
- must not be null.keyspace
- must not be null.boolean contains(Serializable id, Serializable keyspace)
id
- must not be null.keyspace
- must not be null.Object get(Serializable id, Serializable keyspace)
id
- must not be null.keyspace
- must not be null.<T> T get(Serializable id, Serializable keyspace, Class<T> type)
id
- keyspace
- type
- Object delete(Serializable id, Serializable keyspace)
id
- must not be null.keyspace
- must not be null.<T> T delete(Serializable id, Serializable keyspace, Class<T> type)
id
- keyspace
- type
- Iterable<?> getAllOf(Serializable keyspace)
keyspace
- must not be null.Collection
if nothing found.CloseableIterator<Map.Entry<Serializable,Object>> entries(Serializable keyspace)
CloseableIterator
that iterates over all entries.keyspace
- void deleteAllOf(Serializable keyspace)
keyspace
- must not be null.void clear()
Iterable<?> find(KeyValueQuery<?> query, Serializable keyspace)
query
- keyspace
- must not be null.Collection
if no match found.<T> Iterable<T> find(KeyValueQuery<?> query, Serializable keyspace, Class<T> type)
query
- keyspace
- type
- long count(Serializable keyspace)
keyspace
- must not be null.long count(KeyValueQuery<?> query, Serializable keyspace)
query
- keyspace
- must not be null.Copyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.