Send feedback
Class Options (6.50.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 6.50.1 keyboard_arrow_down
public final class Options implements Serializable
Specifies options for various spanner operations
Static Methods
bufferRows(int bufferRows)
public static Options . ReadAndQueryOption bufferRows ( int bufferRows )
Parameter Name Description bufferRows
int
commitStats()
public static Options . TransactionOption commitStats ()
Specifying this instructs the transaction to request CommitStats from the backend.
dataBoostEnabled(Boolean dataBoostEnabled)
public static Options . DataBoostQueryOption dataBoostEnabled ( Boolean dataBoostEnabled )
If this is for PartitionedRead or PartitionedQuery and this field is set to true
, the request
will be executed via Spanner independent compute resources.
Parameter Name Description dataBoostEnabled
Boolean
Returns Type Description com.google.cloud.spanner.Options.DataBoostQueryOption
etag(String etag)
public static Options . DeleteAdminApiOption etag ( String etag )
Specifying this will help in optimistic concurrency control as a way to help prevent
simultaneous deletes of an instance config from overwriting each other. Operations that support
this option are:
Parameter Name Description etag
String
filter(String filter)
public static Options . ListOption filter ( String filter )
Specifying this will cause the given filter to be applied to the list operation. List
operations that support this options are:
If this option is passed to any other list operation, it will throw an
IllegalArgumentException.
Parameter Name Description filter
String
An expression for filtering the results of the request. Filter rules are case
insensitive. Some examples of using filters are:
name:* The entity has a name.
name:Howl The entity's name contains "howl".
name:HOWL Equivalent to above.
NAME:howl Equivalent to above.
labels.env:* The entity has the label env.
labels.env:dev The entity has a label env whose value contains "dev".
name:howl labels.env:dev The entity's name contains "howl" and it has the label env
whose value contains "dev".
limit(long limit)
public static Options . ReadOption limit ( long limit )
Specifying this will cause the read to yield at most this many rows. This should be greater
than 0.
Parameter Name Description limit
long
optimisticLock()
public static Options . TransactionOption optimisticLock ()
Specifying this instructs the transaction to request Optimistic Lock from the backend. In this
concurrency mode, operations during the execution phase, i.e., reads and queries, are performed
without acquiring locks, and transactional consistency is ensured by running a validation
process in the commit phase (when any needed locks are acquired). The validation process
succeeds only if there are no conflicting committed transactions (that committed mutations to
the read data at a commit timestamp after the read timestamp).
pageSize(int pageSize)
public static Options . ListOption pageSize ( int pageSize )
Specifying this will cause the list operations to fetch at most this many records in a page.
Parameter Name Description pageSize
int
pageToken(String pageToken)
public static Options . ListOption pageToken ( String pageToken )
Specifying this will cause the list operation to start fetching the record from this onwards.
Parameter Name Description pageToken
String
prefetchChunks(int prefetchChunks)
public static Options . ReadAndQueryOption prefetchChunks ( int prefetchChunks )
Specifying this will allow the client to prefetch up to prefetchChunks
PartialResultSet
chunks for read and query. The data size of each chunk depends on the server
implementation but a good rule of thumb is that each chunk will be up to 1 MiB. Larger values
reduce the likelihood of blocking while consuming results at the cost of greater memory
consumption. prefetchChunks
should be greater than 0. To get good performance choose a
value that is large enough to allow buffering of chunks for an entire row. Apart from the
buffered chunks, there can be at most one more row buffered in the client.
Parameter Name Description prefetchChunks
int
priority(Options.RpcPriority priority)
public static Options . ReadQueryUpdateTransactionOption priority ( Options . RpcPriority priority )
Specifies the priority to use for the RPC.
tag(String name)
public static Options . ReadQueryUpdateTransactionOption tag ( String name )
Specifying this will cause the reads, queries, updates and writes operations statistics
collection to be grouped by tag.
Parameter Name Description name
String
validateOnly(Boolean validateOnly)
public static Options . CreateUpdateDeleteAdminApiOption validateOnly ( Boolean validateOnly )
Specifying this will not actually execute a request, and provide the same response. Operations
that support this option are:
Parameter Name Description validateOnly
Boolean
Methods
equals(Object o)
public boolean equals ( Object o )
Parameter Name Description o
Object
Overrides
hashCode()
Returns Type Description int
Overrides
toString()
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-19 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-19 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-19 UTC."]]