Class PartitionOptions
Options used to create and read partitions. Instances of this class are immutable so they can be freely reused.
Namespace: Google.Cloud.Spanner.Data
Assembly: Google.Cloud.Spanner.Data.dll
Syntax
public sealed class PartitionOptions
Properties
DataBoostEnabled
If set to true, the partitioned request will be executed using Spanner independent compute resources. The default value for this option is false.
Declaration
public bool DataBoostEnabled { get; }
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
Returns a default instance of PartitionOptions.
Declaration
public static PartitionOptions Default { get; }
Property Value
Type | Description |
---|---|
PartitionOptions |
MaxPartitions
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.
Declaration
public long? MaxPartitions { get; }
Property Value
Type | Description |
---|---|
long? |
Remarks
This option is used when creating the partitions.
PartitionSizeBytes
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.
Declaration
public long? PartitionSizeBytes { get; }
Property Value
Type | Description |
---|---|
long? |
Remarks
This option is used when creating the partitions.
Methods
WithDataBoostEnabled(bool?)
Returns a new instance with the same options as this one, but with the specified new value for DataBoostEnabled.
Declaration
public PartitionOptions WithDataBoostEnabled(bool? dataBoostEnabled)
Parameters
Type | Name | Description |
---|---|---|
bool? | dataBoostEnabled |
Returns
Type | Description |
---|---|
PartitionOptions | A new instance of PartitionOptions. |
WithMaxPartitions(long?)
Returns a new instance with the same options as this one, but with the specified new value for MaxPartitions.
Declaration
public PartitionOptions WithMaxPartitions(long? maxPartitions)
Parameters
Type | Name | Description |
---|---|---|
long? | maxPartitions |
Returns
Type | Description |
---|---|
PartitionOptions | A new instance of PartitionOptions. |
WithPartitionSizeBytes(long?)
Returns a new instance with the same options as this one, but with the specified new value for PartitionSizeBytes.
Declaration
public PartitionOptions WithPartitionSizeBytes(long? partitionSizeBytes)
Parameters
Type | Name | Description |
---|---|---|
long? | partitionSizeBytes |
Returns
Type | Description |
---|---|
PartitionOptions | A new instance of PartitionOptions. |