Google.Cloud.Spanner.Data - Class PartitionOptions (5.0.0-beta04)

public sealed class PartitionOptions

Reference documentation and code samples for the Google.Cloud.Spanner.Data class PartitionOptions.

Options used to create and read partitions. Instances of this class are immutable so they can be freely reused.

Inheritance

object > PartitionOptions

Namespace

Google.Cloud.Spanner.Data

Assembly

Google.Cloud.Spanner.Data.dll

Properties

DataBoostEnabled

public bool DataBoostEnabled { get; }

If set to true, the partitioned request will be executed using Spanner independent compute resources. The default value for this option is false.

Property Value
Type Description
bool
Remarks

This options is not used when creating the partitions themselves. Instead its value is stored in Request and is used when executing the partitioned request.

Default

public static PartitionOptions Default { get; }

Returns a default instance of PartitionOptions.

Property Value
Type Description
PartitionOptions

MaxPartitions

public long? MaxPartitions { get; }

The desired maximum number of partitions to return. The default value for this is null, in which case the server will decide how many partitions to return.

Property Value
Type Description
long
Remarks

This option is used when creating the partitions.

PartitionSizeBytes

public long? PartitionSizeBytes { get; }

The desired data size for each partition generated. The default value for this is null, in which case the server will decide the data size for each partition generated.

Property Value
Type Description
long
Remarks

This option is used when creating the partitions.

Methods

WithDataBoostEnabled(bool?)

public PartitionOptions WithDataBoostEnabled(bool? dataBoostEnabled)

Returns a new instance with the same options as this one, but with the specified new value for DataBoostEnabled.

Parameter
Name Description
dataBoostEnabled bool
Returns
Type Description
PartitionOptions

A new instance of PartitionOptions.

WithMaxPartitions(long?)

public PartitionOptions WithMaxPartitions(long? maxPartitions)

Returns a new instance with the same options as this one, but with the specified new value for MaxPartitions.

Parameter
Name Description
maxPartitions long
Returns
Type Description
PartitionOptions

A new instance of PartitionOptions.

WithPartitionSizeBytes(long?)

public PartitionOptions WithPartitionSizeBytes(long? partitionSizeBytes)

Returns a new instance with the same options as this one, but with the specified new value for PartitionSizeBytes.

Parameter
Name Description
partitionSizeBytes long
Returns
Type Description
PartitionOptions

A new instance of PartitionOptions.