public static class DtFetchOperation.Builder extends Object
Constructor and Description |
---|
Builder(Location location)
Construct a Builder for a DtFetchOperation
|
Modifier and Type | Method and Description |
---|---|
DtFetchOperation |
build() |
DtFetchOperation.Builder |
includeContext(boolean context)
Set whether a context should be returned.
|
DtFetchOperation.Builder |
withBasicQuorum(boolean useBasicQuorum)
Set the basic_quorum value.
|
DtFetchOperation.Builder |
withNotFoundOK(boolean notFoundOK)
Set the not_found_ok value.
|
DtFetchOperation.Builder |
withNVal(int nval)
Set the n_val for this operation.
|
DtFetchOperation.Builder |
withPr(int pr)
Set the PR value for this query.
|
DtFetchOperation.Builder |
withR(int r)
Set the R value for this FetchOperation.
|
DtFetchOperation.Builder |
withSloppyQuorum(boolean sloppyQuorum)
Set whether to use sloppy_quorum.
|
DtFetchOperation.Builder |
withTimeout(int timeout)
Set a timeout for this operation.
|
public Builder(Location location)
location
- the location of the object in Riak.public DtFetchOperation.Builder includeContext(boolean context)
context
- return contextpublic DtFetchOperation.Builder withR(int r)
r
- the R value.public DtFetchOperation.Builder withPr(int pr)
pr
- the PR value.public DtFetchOperation.Builder withNotFoundOK(boolean notFoundOK)
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.
notFoundOK
- the not_found_ok value.public DtFetchOperation.Builder withBasicQuorum(boolean useBasicQuorum)
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.
useBasicQuorum
- the basic_quorum value.public DtFetchOperation.Builder withTimeout(int timeout)
timeout
- a timeout in milliseconds.public DtFetchOperation.Builder withNVal(int nval)
Do not use this unless you understand the ramifications
nval
- the n_val valuepublic DtFetchOperation.Builder withSloppyQuorum(boolean sloppyQuorum)
Do not use this unless you understand the ramifications
sloppyQuorum
- true to use sloppy_quorumpublic DtFetchOperation build()
Copyright © 2016. All rights reserved.