Class Options

public final class Options implements Serializable

Specifies options for various spanner operations

Inheritance

Object > Options

Implements

Serializable

Methods

bufferRows(int bufferRows)

public static Options.ReadAndQueryOption bufferRows(int bufferRows)
Parameter
NameDescription
bufferRowsint
Returns
TypeDescription
Options.ReadAndQueryOption

commitStats()

public static Options.TransactionOption commitStats()

Specifying this instructs the transaction to request CommitStats from the backend.

Returns
TypeDescription
Options.TransactionOption

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

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
NameDescription
filterString

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".

Returns
TypeDescription
Options.ListOption

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

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
NameDescription
limitlong
Returns
TypeDescription
Options.ReadOption

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
NameDescription
pageSizeint
Returns
TypeDescription
Options.ListOption

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
NameDescription
pageTokenString
Returns
TypeDescription
Options.ListOption

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
NameDescription
prefetchChunksint
Returns
TypeDescription
Options.ReadAndQueryOption

priority(Options.RpcPriority priority)

public static Options.ReadQueryUpdateTransactionOption priority(Options.RpcPriority priority)

Specifies the priority to use for the RPC.

Parameter
NameDescription
priorityOptions.RpcPriority
Returns
TypeDescription
Options.ReadQueryUpdateTransactionOption

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
NameDescription
nameString
Returns
TypeDescription
Options.ReadQueryUpdateTransactionOption

toString()

public String toString()
Returns
TypeDescription
String
Overrides