@Stability.Volatile public class ScanOptions extends CommonOptions<ScanOptions>
Modifier and Type | Class and Description |
---|---|
class |
ScanOptions.Built |
CommonOptions.BuiltCommonOptions
Modifier and Type | Method and Description |
---|---|
ScanOptions |
batchByteLimit(int batchByteLimit)
Allows to limit the maximum amount of bytes that are sent from the server to the client on each partition batch.
|
ScanOptions |
batchItemLimit(int batchItemLimit)
Allows to limit the maximum amount of documents that are sent from the server to the client on each partition batch.
|
ScanOptions.Built |
build() |
ScanOptions |
consistentWith(MutationState mutationState) |
ScanOptions |
idsOnly(boolean idsOnly)
If set to true, the content of the document is not included in the results.
|
static ScanOptions |
scanOptions() |
ScanOptions |
transcoder(Transcoder transcoder)
Allows to specify a custom transcoder that is used to decode the content of the result.
|
clientContext, parentSpan, retryStrategy, self, timeout
public static ScanOptions scanOptions()
public ScanOptions idsOnly(boolean idsOnly)
idsOnly
- True means document content and metadata are excluded from result; default is false.ScanOptions
to allow method chaining.public ScanOptions transcoder(Transcoder transcoder)
transcoder
- the custom transcoder that should be used for decoding.ScanOptions
to allow method chaining.public ScanOptions consistentWith(MutationState mutationState)
public ScanOptions batchByteLimit(int batchByteLimit)
This option:
Also, the server will always send the document body, even if the configured byte limit is smaller. So as an example if a batchByteLimit of 1MB (1_000_000) is set and the document body size is 5MB it will still be sent to the client as a whole and not cut off in between.
If both this option and batchItemLimit(int)
are set, both will be sent to the server
and the smaller one will trigger first.
batchByteLimit
- the byte limit to set per stream, defaults to 15000 (15k).ScanOptions
to allow method chaining.public ScanOptions batchItemLimit(int batchItemLimit)
This option:
If both this option and batchByteLimit(int)
are set, both will be sent to the server and the smaller
one will trigger first.
batchItemLimit
- the item limit to set per stream, defaults to 50.ScanOptions
to allow method chaining.@Stability.Internal public ScanOptions.Built build()
Copyright © 2024 Couchbase, Inc.. All rights reserved.