|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Bucket
The primary interface for working with Key/Value data in Riak, a factory for key/value 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| Method Summary | ||
|---|---|---|
DeleteObject |
delete(String key)
Creates a DeleteObject operation that will delete the data at
key on execute(). |
|
|
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)
Creates a FetchObject that returns the data at key
as an IRiakObject on execute(). |
|
|
fetch(String key,
Class<T> type)
Creates a FetchObject operation that returns the data at
key as an instance of type T on
execute(). |
|
|
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(). |
|
|
fetchIndex(RiakIndex<T> index)
Creates a FetchIndex operation for the given index name and type |
|
String |
getName()
Get this Buckets name. |
|
Iterable<String> |
keys()
An Iterable view of the keys stored in this bucket. |
|
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. |
|
|
store(String key,
T o)
Creates a StoreObject for storing o of type
T at key on execute(). |
|
|
store(T o)
Creates a StoreObject for storing o of type
T on execute(). |
|
| Methods inherited from interface com.basho.riak.client.bucket.BucketProperties |
|---|
getAllowSiblings, getBackend, getBasicQuorum, getBigVClock, getChashKeyFunction, getDW, getLastWriteWins, getLinkWalkFunction, getNotFoundOK, getNVal, getOldVClock, getPostcommitHooks, getPR, getPrecommitHooks, getPW, getR, getRW, getSearch, getSmallVClock, getW, getYoungVClock, isSearchEnabled |
| Method Detail |
|---|
String 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[]
StoreObjectStoreObject
StoreObject<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 string
StoreObjectStoreObject<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 store
StoreObjectStoreObject
<T> StoreObject<T> store(String key,
T o)
StoreObject for storing o of type
T at key on execute().
T - the Type of oo - the data to storekey - the key
StoreObjectStoreObjectFetchObject<IRiakObject> fetch(String key)
FetchObject that returns the data at key
as an IRiakObject on execute().
key - the key
FetchObjectFetchObject
<T> FetchObject<T> fetch(String key,
Class<T> type)
FetchObject operation that returns the data at
key as an instance of type T on
execute().
T - the Type to returnkey - the key under which the data is storedtype - the Class of the type to return
FetchObjectFetchObject<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
RiakKey
FetchObjectFetchObject<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 RiakKey
DeleteObjectDeleteObjectDeleteObject delete(String key)
DeleteObject operation that will delete the data at
key on execute().
T - the Type of oo - an instance of T with a value for the key in the
field annotated by RiakKey
DeleteObjectDeleteObject
Iterable<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 type
T - the index type (currently String or Integer)index - an index
FetchIndex operation for further configuration and
execution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||