StorePropsBase Class
Constructor
StorePropsBase
-
options
-
pbRequestName
-
pbResponseName
-
callback
-
callback
Parameters:
-
options
ObjectThe properties to store
-
[r]
Number optionalThe R value.
-
[pr]
Number optionalThe PR value.
-
[w]
Number optionalThe W value.
-
[dw]
Number optionalThe DW value.
-
[pw]
Number optionalThe PW value.
-
[rw]
Number optionalThe RW value.
-
[notFoundOk]
Boolean optionalIf true a vnode returning notfound for a key increments the r tally.
-
[basicQuorum]
Boolean optionalControls whether a read request should return early in some fail cases.
-
[nVal]
Number optionalThe number of replicas.
-
[allowMult]
Boolean optionalWhether to allow sibling objects to be created.
-
[lastWriteWins]
Boolean optionalWhether to ignore vector clocks when writing.
-
[oldVClock]
Number optionalAn epoch time value.
-
[youngVClock]
Number optionalAn epoch time value.
-
[bigVClock]
Number optionalAn epoch time value.
-
[smallVClock]
Number optionalAn epoch time value.
-
[backend]
Sring optionalThe name of the backend to use.
-
[search]
Boolean optionalEnable the pre-commit hook for Legacy Riak search.
-
[searchIndex]
String optionalThe name of the search index to use.
-
[chashKeyfun]
Object optionalAn object representing the Erlang func to use.
-
[precommit]
Object optionalArray of precommit hooks
-
[postcommit]
Object optionalArray of postcommit hooks
-
-
pbRequestName
Stringname of the Riak protocol buffer this command will send
-
pbResponseName
Stringname of the Riak protocol buffer this command will receive
-
callback
FunctionThe callback to be executed when the operation completes.
-
err
StringAn error message. Will be null if no error.
-
response
Booleanthe response from Riak. This will be true.
-
-
callback
FunctionThe callback to be executed when the operation completes.
-
String
An error message. Will ne null if no error.
-
Object
The response from Riak. This is an oject with all the bucket properties.
-
Object
additional error data. Will be null if no error.
-
Item Index
Methods
- addPostcommitHook
- addPrecommitHook
- constructPbRequest
- getCallback
- getExpectedResponseCode
- getPbReqBuilder
- getRiakMessage
- onError
- onRiakError
- onSuccess
- withAllowMult
- withBackend
- withBasicQuorum
- withBigVClock
- withBucketType
- withCallback
- withChashkeyFunction
- withDw
- withLastWriteWins
- withLegacySearchEnabled
- withNotFoundOk
- withNVal
- withOldVClock
- withPr
- withPw
- withR
- withRw
- withSearchIndex
- withSmallVClock
- withW
- withYoungVClock
Methods
addPostcommitHook
-
postcommitHook
Add a pre-commit hook.
Parameters:
-
postcommitHook
Objectthe hook to add.
addPrecommitHook
-
precommitHook
Add a pre-commit hook.
Parameters:
-
precommitHook
Objectthe hook to add.
constructPbRequest
()
Object
protected
Returns:
getCallback
()
Function
private
Returns:
getExpectedResponseCode
()
Number
private
Returns:
getPbReqBuilder
()
Object
private
Returns:
getRiakMessage
()
Object
private
Returns:
onError
-
msg
-
data
Parameters:
-
msg
Stringan error message -
data
Objectadditional error data
onRiakError
-
rpbErrorResp
Parameters:
-
rpbErrorResp
Objectthe RpbErrorResp protocol buffer
onSuccess
-
pbResponseMessage
Parameters:
-
pbResponseMessage
Objectthe protocol buffer received from riak
Returns:
withAllowMult
-
allowMult
Set the allow_multi value.
Parameters:
-
allowMult
Booleanwhether to allow sibling objects to be created.
withBackend
-
backend
Set the backend used by this bucket. Only applies when using riak_kv_multi_backend in Riak.
Parameters:
-
backend
Sringthe name of the backend to use.
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:
-
useBasicQuorum
Booleanthe basic_quorum value.
withBigVClock
-
bigVClock
Set the big VClock value.
Parameters:
-
bigVClock
Numberan epoch time value
withBucketType
-
bucketType
Set the bucket type. If not supplied, 'default' is used.
Parameters:
-
bucketType
Stringthe bucket type in riak
withCallback
-
callback
Set the callback to be executed when the operation completes.
Parameters:
-
callback
FunctionThe callback to be executed when the operation completes.
-
err
StringAn error message. Will ne null if no error.
-
response
ObjectThe response from Riak. This is an oject with all the bucket properties.
-
withChashkeyFunction
-
func
Set the chash_keyfun value.
Parameters:
-
func
Objecta object representing the Erlang func to use.
withDw
-
dw
Set the DW value. How many replicas to commit to durable storage before returning a successful response. If not set the bucket default is used.
Parameters:
-
dw
Numberthe DW value.
withLastWriteWins
-
lastWriteWins
Set the last_write_wins value. Unless you really know what you're doing, you probably do not want to set this to true.
Parameters:
-
lastWriteWins
Booleanwhether to ignore vector clocks when writing.
withLegacySearchEnabled
-
search
Enable Legacy Riak Search. Setting this to true causes the search pre-commit hook to be added.
Note this is only for legacy Riak (< v2.0) Search support.
Parameters:
-
search
Booleanenable add/remove (true/false) the pre-commit hook for Legacy Riak Search.
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.
Parameters:
-
notFoundOk
Booleanthe not_found_ok value.
withNVal
-
nVal
Set the nVal.
Parameters:
-
nVal
Numberthe number of replicas.
withOldVClock
-
oldVClock
Set the old VClock value
Parameters:
-
oldVClock
Numberan epoch time value
withPr
-
pr
Set the PR value. If not asSet the bucket default is used.
Parameters:
-
pr
Numberthe PR value.
withPw
-
pw
Set the PW value. How many primary nodes must be up when the write is attempted. If not set the bucket default is used.
Parameters:
-
pw
Numberthe PW value.
withR
-
r
Set the R value. If not asSet the bucket default is used.
Parameters:
-
r
Numberthe R value.
withRw
-
rw
Set the RW value. Quorum for both operations (get and put) involved in deleting an object .
Parameters:
-
rw
Numberthe RW value.
withSearchIndex
-
searchIndex
Associate a Search Index. This only applies if Yokozuna is enabled in Riak v2.0.
Parameters:
-
searchIndex
StringThe name of the search index to use.
withSmallVClock
-
smallVClock
Set the small VClock value.
Parameters:
-
smallVClock
Numberan epoch time value.
withW
-
w
Set the W value. How many replicas to write to before returning a successful response. If not set the bucket default is used.
Parameters:
-
w
Numberthe W value.
withYoungVClock
-
youngVClock
Set the young VClock value
Parameters:
-
youngVClock
Numberan epoch time value