|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.basho.riak.client.operations.FetchObject<T>
public class FetchObject<T>
An operation to get some data from Riak.
Use Bucket.fetch(String) methods to create a fetch operation. Also
look at DomainBucket.fetch(Object).
Bucket,
DomainBucket| Constructor Summary | |
|---|---|
FetchObject(RawClient client,
String bucket,
String key,
Retrier retrier)
Create a new FetchOperation that delegates to the given client to fetch the data from bucket at
key using retrier |
|
| Method Summary | |
|---|---|
FetchObject<T> |
basicQuorum(boolean basicQuorum)
|
T |
execute()
Attempts to fetch the data at bucket/key, convert it with
Converter and resolve any siblings with ConflictResolver |
VClock |
getVClock()
|
boolean |
hasDeletedVclock()
|
boolean |
hasVclock()
|
FetchObject<T> |
ifModified(VClock vclock)
*NOTE* PB Only. |
boolean |
isUnmodified()
|
FetchObject<T> |
modifiedSince(Date modifiedSince)
*NOTE* HTTP Only. |
FetchObject<T> |
notFoundOK(boolean notFoundOK)
|
FetchObject<T> |
pr(int pr)
|
FetchObject<T> |
pr(Quora pr)
|
FetchObject<T> |
pr(Quorum pr)
|
FetchObject<T> |
r(int r)
The read quorum for this fetch operation |
FetchObject<T> |
r(Quora r)
The read quorum for this fetch operation |
FetchObject<T> |
r(Quorum r)
The read quorum for this fetch operation |
FetchObject<T> |
returnDeletedVClock(boolean returnDeletedVClock)
|
FetchObject<T> |
withConverter(Converter<T> converter)
A Converter to use to convert the data fetched to some other type |
FetchObject<T> |
withResolver(ConflictResolver<T> resolver)
|
FetchObject<T> |
withRetrier(Retrier retrier)
A Retrier to use |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FetchObject(RawClient client,
String bucket,
String key,
Retrier retrier)
client to fetch the data from bucket at
key using retrier
Use Bucket to create a Fetch operation, also consider using
DomainBucket
client - the RawClient to use for the operationbucket - the name of the bucket to get the data item fromkey - the name of the key to get the data item fromretrier - the Retrier to use when executing the operation.| Method Detail |
|---|
public T execute()
throws UnresolvedConflictException,
RiakRetryFailedException,
ConversionException
bucket/key, convert it with
Converter and resolve any siblings with ConflictResolver
execute in interface RiakOperation<T>T that was stored at
bucket/key or null if not found.
UnresolvedConflictException - if the ConflictResolver used cannot get a single
value from any siblings
RiakRetryFailedException - if the Retrier fails to execute the operation beyond
some internal bound
ConversionException - if the supplied Converter throws trying to convert
the retrieved value.public FetchObject<T> withResolver(ConflictResolver<T> resolver)
public FetchObject<T> r(int r)
r - an Integer for the read quorum
public FetchObject<T> r(Quora r)
r - an Quora for the read quorum
public FetchObject<T> r(Quorum r)
r - an Quorum for the read quorum
public FetchObject<T> pr(int pr)
pr -
FetchMeta.Builder.pr(int)public FetchObject<T> pr(Quora pr)
pr -
FetchMeta.Builder.pr(Quora)public FetchObject<T> pr(Quorum pr)
pr -
FetchMeta.Builder.pr(Quora)public FetchObject<T> notFoundOK(boolean notFoundOK)
notFoundOK -
FetchMeta.Builder.notFoundOK(boolean)public FetchObject<T> basicQuorum(boolean basicQuorum)
basicQuorum -
FetchMeta.Builder.basicQuorum(boolean)public FetchObject<T> returnDeletedVClock(boolean returnDeletedVClock)
returnDeletedVClock -
FetchMeta.Builder.returnDeletedVClock(boolean)public FetchObject<T> modifiedSince(Date modifiedSince)
modifiedSince - a last modified date.
public FetchObject<T> ifModified(VClock vclock)
vclock - a vclock
public FetchObject<T> withConverter(Converter<T> converter)
Converter to use to convert the data fetched to some other type
converter -
public FetchObject<T> withRetrier(Retrier retrier)
Retrier to use
retrier -
public boolean isUnmodified()
public boolean hasDeletedVclock()
public boolean hasVclock()
public VClock getVClock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||