Skip to content

Commit

Permalink
docs: Improvements on DataBoostEnabled docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda-tarafa committed Jun 15, 2023
1 parent ab7526f commit 5791342
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
Expand Up @@ -12,25 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Threading;

namespace Google.Cloud.Spanner.Data;

/// <summary>
/// An immutable class representing partition options.
/// Options used to create and read partitions.
/// Instances of this class are immutable so they can be freely reused.
/// </summary>
/// <remarks>
/// <para>
/// The specified values of `PartitionSizeBytes` and `MaxPartitions`
/// are utilized in the RPC call while generating the partition tokens.
/// </para>
/// <para>
/// The specified flag for `DataBoostEnabled` will be stored in the request property
/// of the <see cref="CommandPartition"/> object and is used when creating a request
/// to read from the partition. If `DataBoostEnabled` is set to true, the request will be
/// executed using Spanner-independent compute resources.
/// </para>
/// </remarks>
public sealed class PartitionOptions
{
/// <summary>
Expand Down Expand Up @@ -60,18 +47,25 @@ public sealed class PartitionOptions
/// 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.
/// </summary>
/// <remarks>This option is used when creating the partitions.</remarks>
public long? PartitionSizeBytes { get; }

/// <summary>
/// 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.
/// </summary>
/// <remarks>This option is used when creating the partitions.</remarks>
public long? MaxPartitions { get; }

/// <summary>
/// If set to true, the request will be executed using Spanner independent compute resources.
/// If set to true, the partitioned request will be executed using Spanner independent compute resources.
/// The default value for this option is false.
/// </summary>
/// <remarks>
/// This options is not used when creating the partitions themselves.
/// Instead its value is stored in <see cref="CommandPartition.Request"/> and is used when executing the
/// partitioned request.
/// </remarks>
public bool DataBoostEnabled { get; }

/// <summary>
Expand Down
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

using Google.Api.Gax;
using Google.Cloud.Spanner.V1;
using System;
using System.Collections.Generic;
using System.Data;
Expand Down Expand Up @@ -413,9 +412,7 @@ public override void Prepare()
/// by <see cref="SpannerConnection.CreateCommandWithPartition"/> to create a new <see cref="SpannerCommand"/>
/// that returns a subset of data.
/// </summary>
/// <param name="options">An instance of <see cref="PartitionOptions"/> class in
/// which we can set the maxPartitions, partitionSizeBytes, dataBoostEnabled and
/// cancellationToken options for generating and executing partitions.
/// <param name="options">The <see cref="PartitionOptions"/> used to create and read partitions.
/// </param>
/// <param name="cancellationToken">An optional token for canceling the call.</param>
/// <returns>The list of partitions that can be used to create <see cref="SpannerCommand"/>
Expand Down

0 comments on commit 5791342

Please sign in to comment.