public static class ParallelScan.Builder extends Object
ParallelScan
queries.Modifier and Type | Field and Description |
---|---|
protected int |
myBatchSize
The number of documents to be returned in each batch of results.
|
protected ReadPreference |
myReadPreference
The preference for which servers to use to retrieve the results.
|
protected int |
myRequestedIteratorCount
The desired number of iterators/cursors to create.
|
Constructor and Description |
---|
ParallelScan.Builder()
Creates a new Builder.
|
Modifier and Type | Method and Description |
---|---|
ParallelScan.Builder |
batchSize(int batchSize)
Sets the value of the number of documents to be returned in each
batch.
|
ParallelScan |
build()
Constructs a new
ParallelScan object from the state of the
builder. |
ParallelScan.Builder |
readPreference(ReadPreference readPreference)
Sets the preference for the set of servers to retrieve the results
from.
|
ParallelScan.Builder |
requestedIteratorCount(int numberOfIterators)
Sets the requested number of iterators/cursors to create to the new
value.
|
ParallelScan.Builder |
reset()
Resets the builder back to its initial state for reuse.
|
ParallelScan.Builder |
setBatchSize(int batchSize)
Sets the value of the number of documents to be returned in each
batch.
|
ParallelScan.Builder |
setReadPreference(ReadPreference readPreference)
Sets the preference for the set of servers to retrieve the results
from.
|
ParallelScan.Builder |
setRequestedIteratorCount(int numberOfIterators)
Sets the requested number of iterators/cursors to create to the new
value.
|
protected int myBatchSize
protected ReadPreference myReadPreference
protected int myRequestedIteratorCount
This value will be forced into the range [1, 10,000].
public ParallelScan.Builder batchSize(int batchSize)
This method delegates to setBatchSize(int)
.
batchSize
- The new value for the number of documents to be returned
in each batch.public ParallelScan build()
ParallelScan
object from the state of the
builder.ParallelScan
object.public ParallelScan.Builder readPreference(ReadPreference readPreference)
This method delegates to setReadPreference(ReadPreference)
.
readPreference
- The new value for the preference of which server to return
the results from.public ParallelScan.Builder requestedIteratorCount(int numberOfIterators)
This value will be forced into the range [1, 10,000].
This method delegates to setRequestedIteratorCount(int)
.
numberOfIterators
- The requested number of iterators/cursors to create.public ParallelScan.Builder reset()
public ParallelScan.Builder setBatchSize(int batchSize)
batchSize
- The new value for the number of documents to be returned
in each batch.public ParallelScan.Builder setReadPreference(ReadPreference readPreference)
readPreference
- The new value for the preference of which server to return
the results from.public ParallelScan.Builder setRequestedIteratorCount(int numberOfIterators)
This value will be forced into the range [1, 10,000].
numberOfIterators
- The requested number of iterators/cursors to create.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.