public interface Bucket extends BucketProperties
RiakOperations.
Provides convenience methods for creating RiakOperations for storing
byte[] and String data in Riak. Also provides
methods for creating RiakOperations for storing Java Bean style POJOs
in Riak. A Bucket is a factory for RiakOperations on Key/Value
data.
Gives access to all the BucketProperties that the underlying API
transport exposes. NOTE: soon this will be *all* the BucketProperties
Provides access to an Iterable for the keys in the bucket.
StoreObject,
FetchObject,
DeleteObject| Modifier and Type | Method and Description |
|---|---|
CounterObject |
counter(String counter)
Creates a
CounterObject operation |
DeleteObject |
delete(String key)
|
<T> DeleteObject |
delete(T o)
Creates a
DeleteObject operation that will delete the data at
o's RiakKey annotated field value on
execute(). |
FetchObject<IRiakObject> |
fetch(String key)
|
<T> FetchObject<T> |
fetch(String key,
Class<T> type)
|
<T> FetchObject<T> |
fetch(T o)
Creates a
FetchObject operation that returns the data at
o's annotated RiakKey field as an instance of type
T on execute(). |
<T> FetchIndex<T> |
fetchIndex(RiakIndex<T> index)
Creates a
FetchIndex operation for the given index name and type |
String |
getName()
Get this Buckets name.
|
StreamingOperation<String> |
keys()
An
Iterable view of the keys stored in this bucket. |
<T> MultiFetchObject<T> |
multiFetch(List<String> keys,
Class<T> type)
Creates a
MultiFetchObject operation that returns the datum at
keys as a list of type T futures on
execute(). |
<T> MultiFetchObject<T> |
multiFetch(List<T> o)
Creates a
MultiFetchObject operation that returns the data at
o's annotated RiakKey field as a list of type
T futures on execute(). |
MultiFetchObject<IRiakObject> |
multiFetch(String[] keys)
Creates a
MultiFetchObject that returns the datum at keys
as a list of IRiakObject futures on execute(). |
StoreObject<IRiakObject> |
store(String key,
byte[] value)
Creates a
StoreObject that will store a new IRiakObject. |
StoreObject<IRiakObject> |
store(String key,
String value)
Creates a
StoreObject that will store a new IRiakObject. |
<T> StoreObject<T> |
store(String key,
T o)
|
<T> StoreObject<T> |
store(T o)
|
getAllowSiblings, getBackend, getBasicQuorum, getBigVClock, getChashKeyFunction, getDW, getLastWriteWins, getLinkWalkFunction, getNotFoundOK, getNVal, getOldVClock, getPostcommitHooks, getPR, getPrecommitHooks, getPW, getR, getRW, getSearch, getSmallVClock, getW, getYoungVClock, isSearchEnabledString getName()
StoreObject<IRiakObject> store(String key, byte[] value)
StoreObject that will store a new IRiakObject.key - the key to store the data under.value - the data as a byte[]StoreObjectStoreObjectStoreObject<IRiakObject> store(String key, String value)
StoreObject that will store a new IRiakObject.key - the key to store the data under.value - the data as a stringStoreObjectStoreObject<T> StoreObject<T> store(T o)
StoreObject for storing o of type
T on execute(). T must have
a field annotated with RiakKey.T - the Type of oo - the data to storeStoreObjectStoreObject<T> StoreObject<T> store(String key, T o)
T - the Type of oo - the data to storekey - the keyStoreObjectStoreObjectFetchObject<IRiakObject> fetch(String key)
key - the keyFetchObjectFetchObject<T> FetchObject<T> fetch(String key, Class<T> type)
T - the Type to returnkey - the key under which the data is storedtype - the Class of the type to returnFetchObjectFetchObject<T> FetchObject<T> fetch(T o)
FetchObject operation that returns the data at
o's annotated RiakKey field as an instance of type
T on execute().T - the Type to returno - an instance ot T that has the key annotated with
RiakKeyFetchObjectFetchObjectMultiFetchObject<IRiakObject> multiFetch(String[] keys)
MultiFetchObject that returns the datum at keys
as a list of IRiakObject futures on execute().keys - the keysMultiFetchObjectMultiFetchObject<T> MultiFetchObject<T> multiFetch(List<String> keys, Class<T> type)
MultiFetchObject operation that returns the datum at
keys as a list of type T futures on
execute().T - the Type to returnkeys - the list of keys under which the data is storedtype - the Class of the type to returnMultiFetchObjectMultiFetchObject<T> MultiFetchObject<T> multiFetch(List<T> o)
MultiFetchObject operation that returns the data at
o's annotated RiakKey field as a list of type
T futures on execute().T - the Type to returno - a List of T that has the keys annotated with
RiakKeyMultiFetchObjectMultiFetchObjectCounterObject counter(String counter)
CounterObject operationcounter - the name (key) for the counterCounterObject<T> DeleteObject delete(T o)
DeleteObject operation that will delete the data at
o's RiakKey annotated field value on
execute().T - the Type of oo - an instance of T with a value for the key in the
field annotated by RiakKeyDeleteObjectDeleteObjectDeleteObject delete(String key)
T - the Type of oo - an instance of T with a value for the key in the
field annotated by RiakKeyDeleteObjectDeleteObjectStreamingOperation<String> keys() throws RiakException
Iterable view of the keys stored in this bucket.Iterable of Strings.RiakException<T> FetchIndex<T> fetchIndex(RiakIndex<T> index)
FetchIndex operation for the given index name and typeT - the index type (currently String or Long)index - an indexFetchIndex operation for further configuration and
executionCopyright © 2014. All Rights Reserved.