FetchSet Class
Command used to fetch a set from Riak.
As a convenience, a builder class is provided:
var fetch = new FetchSet.Builder()
                .withBucketType('myBucketType')
                .withBucket('myBucket')
                .withKey('myKey')
                .withCallback(myCallback)
                .build();
See FetchSet.Builder
Constructor
FetchSet
        
            (
    
    - 
                        
options - 
                        
callback 
Parameters:
- 
                        
optionsObjectThe options to use for this command.
- 
                                    
bucketTypeStringThe bucket type in riak.
 - 
                                    
bucketStringThe bucket in riak.
 - 
                                    
keyStringThe key for the counter you want to fetch.
 - 
                                    
[setsAsBuffers=false]Boolean optionalReturn values as Buffers rather than strings.
 - 
                                    
[timeout]Number optionalTet a timeout for this operation.
 - 
                                    
[r]Number optionalThe R value to use for this fetch.
 - 
                                    
[pr]Number optionalThe PR value to use for this fetch.
 - 
                                    
[notFoundOk]Boolean optionalIf true a vnode returning notfound for a key increments the r tally.
 - 
                                    
[useBasicQuorum]Boolean optionalControls whether a read request should return early in some fail cases.
 
 - 
                                    
 - 
                        
callbackFunctionThe callback to be executed when the operation completes.
- 
                                    
errStringAn error message. Will be null if no error.
 - 
                                    
responseObjectThe response from Riak.
- 
                                                
contextBufferAn opaque context to be used in any subsequent modification of the set. - 
                                                
valuesString | BufferAn array holding the values in the set. String by default, Buffers if setsAsBuffers was used. - 
                                                
isNotFoundBooleanTrue if there was no set in Riak. 
 - 
                                                
 - 
                                    
dataObjectadditional error data. Will be null if no error.
 
 - 
                                    
 
Item Index
Methods
constructPbRequest
        ()
        
            Object
        
        protected
    
    
        Construct and return the Riak protocol buffer message for this command.
Subclasses must override this method.
    
        Returns:
                        Object:
                    a protocol buffer message builder
            
        getCallback
        ()
        
            Function
        
        private
    
    
        Fires the user's callback with the arguments passed in.
    
        Returns:
                        Function:
                    the user supplied callback
            
        getExpectedResponseCode
        ()
        
            Number
        
        private
    
    
        Returns the expected response code for this command.
    
        Returns:
                        Number:
                    the expected response code for this command.
            
        getPbReqBuilder
        ()
        
            Object
        
        private
    
    
        Returns and instance of the protocol buffer message builder for this command.
This is determined via the pbRequestName passed to the constructor.
    
        Returns:
                        Object:
                    the builder for the protocol buffer message to be sent for this command
            
        getRiakMessage
        ()
        
            Object
        
        private
    
    
        Returns the encoded protobuf and message header.
    
        Returns:
                        Object:
                    object containing the header and encoded protobuf
            
        onError
        
            (
        protected
    
    - 
                        
msg - 
                        
data 
        Called by RiakNode if an error occurs executing the command and all retries are exhausted.
    
        Parameters:
- 
                        
msgStringan error message - 
                        
dataObjectadditional error data 
onRiakError
        
            (
        protected
    
    - 
                        
rpbErrorResp 
        Called by RiakNode when a RpbErrorResp is received and all retries are exhausted.
Commands may override this method.
    
        Parameters:
- 
                        
rpbErrorRespObjectthe RpbErrorResp protocol buffer 
onSuccess
        
            (
        
            Boolean
        
        protected
    
    - 
                        
pbResponseMessage 
        Called by RiakNode when a response is received.
Subclasses must override this method.
    
        Parameters:
- 
                        
pbResponseMessageObjectthe protocol buffer received from riak 
Returns:
                        Boolean:
                    true if not streaming or the last response has been received, false otherwise.
            
        