public class FetchObject<T> extends Object implements RiakOperation<T>
Use Bucket.fetch(String) methods to create a fetch operation. Also
look at DomainBucket.fetch(Object).
Bucket,
DomainBucket| Constructor and Description |
|---|
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 |
| Modifier and Type | Method and Description |
|---|---|
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 |
public T execute() throws UnresolvedConflictException, RiakRetryFailedException, ConversionException
bucket/key, convert it with
Converter and resolve any siblings with ConflictResolverexecute 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 siblingsRiakRetryFailedException - if the Retrier fails to execute the operation beyond
some internal boundConversionException - 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 quorumpublic FetchObject<T> r(Quora r)
r - an Quora for the read quorumpublic FetchObject<T> r(Quorum r)
r - an Quorum for the read quorumpublic 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 vclockpublic FetchObject<T> withConverter(Converter<T> converter)
Converter to use to convert the data fetched to some other typeconverter - public FetchObject<T> withRetrier(Retrier retrier)
Retrier to useretrier - public boolean isUnmodified()
public boolean hasDeletedVclock()
public boolean hasVclock()
public VClock getVClock()
Copyright © 2012. All Rights Reserved.