FetchValue.Builder Class
A builder for constructing FetchValue instances.
Rather than having to manually construct the options and instantiating a FetchValue directly, this builder may be used.
var fetchValue = new FetchValue.Builder()
     .withBucket('myBucket')
     .withKey('myKey')
     .build();
Constructor
FetchValue.Builder
        ()
    
    Item Index
Methods
withBasicQuorum
        - 
                        
useBasicQuorum 
Set the basic_quorum value. The parameter controls whether a read request should return early in some fail cases. E.g. If a quorum of nodes has already returned notfound/error, don't wait around for the rest.
Parameters:
- 
                        
useBasicQuorumBooleanthe basic_quorum value.
 
withBucket
        - 
                        
bucket 
Set the bucket.
Parameters:
- 
                        
bucketStringthe bucket in Riak
 
withBucketType
        - 
                        
bucketType 
Set the bucket type. If not supplied, 'default' is used.
Parameters:
- 
                        
bucketTypeStringthe bucket type in riak
 
withCallback
        - 
                        
callback 
Set the callback to be executed when the operation completes.
Parameters:
- 
                        
callbackFunctionThe callback to be executed when the operation completes.
- 
                                    
errStringAn error message. Will ne null if no error.
 - 
                                    
responseObjectthe response from Riak.
- 
                                                
isNotFoundBooleanTrue if there was no value in Riak. - 
                                                
isUnchangedBooleanTrue if the object has not changed (based on a vclock provided via ifModified) - 
                                                
vclockBufferThe vector clock for this object (and its siblings) - 
                                                
valuesObject | RiakObject[]An array of one or more values. Either RiakObjects or JS objects if convertToJs was used. 
 - 
                                                
 
 - 
                                    
 
withConflictResolver
        - 
                        
conflictResolver 
Provide a conflict resolver to resolve siblings. If siblings are present Riak will return all of them. The provided function will be used to resolve these to a single response.
If a conflict resolver is not provided all siblings will be returned.
Parameters:
- 
                        
conflictResolverFunction- the conflict resolver to be used.
 
 
withConvertValueToJs
        - 
                        
convert 
Convert the value stored in Riak to a JS object. Values are stored in Riak as bytes. Setting this to true will convert the value to a JS object using JSON.parse() before passing them to the conflict resolver.
Parameters:
- 
                        
convertBoolean- true to convert the value(s), false otherwise.
 
 
withHeadOnly
        - 
                        
headOnly 
Return only the metadata. Causes Riak to only return the metadata for the object. The value will be asSet to null.
Parameters:
- 
                        
headOnlyBooleantrue to return only metadata.
 
withIfModified
        - 
                        
vclock 
Return the object if the supplied vclock does not match.
Parameters:
- 
                        
vclockBufferthe vclock to match on
 
withKey
        - 
                        
key 
Set the key.
Parameters:
- 
                        
keyStringthe key in riak.
 
withNotFoundOk
        - 
                        
notFoundOk 
Set the not_found_ok value. If true a vnode returning notfound for a key increments the r tally. False is higher consistency, true is higher availability. If not asSet the bucket default is used.
Parameters:
- 
                        
notFoundOkBooleanthe not_found_ok value.
 
withPr
        - 
                        
pr 
Set the PR value. If not asSet the bucket default is used.
Parameters:
- 
                        
prNumberthe PR value.
 
withR
        - 
                        
r 
Set the R value. If not asSet the bucket default is used.
Parameters:
- 
                        
rNumberthe R value.
 
withReturnDeletedVClock
        - 
                        
returnDeletedVClock 
Set whether to return tombstones.
Parameters:
- 
                        
returnDeletedVClockBooleantrue to return tombstones, false otherwise.
 
withTimeout
        - 
                        
timeout 
Set a timeout for this operation.
Parameters:
- 
                        
timeoutNumbera timeout in milliseconds.
 
