/// <summary>
        /// Constructs a client wrapper for the Bigtable service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="BigtableSettings"/> used within this client </param>
        public BigtableClientImpl(Bigtable.BigtableClient grpcClient, BigtableSettings settings)
        {
            this.GrpcClient = grpcClient;
            BigtableSettings effectiveSettings = settings ?? BigtableSettings.GetDefault();
            ClientHelper     clientHelper      = new ClientHelper(effectiveSettings);

            _callMutateRow = clientHelper.BuildApiCall <MutateRowRequest, MutateRowResponse>(
                GrpcClient.MutateRowAsync, GrpcClient.MutateRow, effectiveSettings.MutateRowSettings);
            _callCheckAndMutateRow = clientHelper.BuildApiCall <CheckAndMutateRowRequest, CheckAndMutateRowResponse>(
                GrpcClient.CheckAndMutateRowAsync, GrpcClient.CheckAndMutateRow, effectiveSettings.CheckAndMutateRowSettings);
            _callReadModifyWriteRow = clientHelper.BuildApiCall <ReadModifyWriteRowRequest, ReadModifyWriteRowResponse>(
                GrpcClient.ReadModifyWriteRowAsync, GrpcClient.ReadModifyWriteRow, effectiveSettings.ReadModifyWriteRowSettings);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnConstruction(
     Bigtable.BigtableClient grpcClient,
     BigtableServiceApiSettings effectiveSettings,
     ClientHelper clientHelper) =>
 _defaultSettings = effectiveSettings.Clone();
示例#3
0
 partial void OnConstruction(Bigtable.BigtableClient grpcClient, BigtableSettings effectiveSettings, ClientHelper clientHelper)
 {
     _idempotentMutateRowSettings = effectiveSettings.IdempotentMutateRowSettings;
 }
 partial void OnConstruction(Bigtable.BigtableClient grpcClient, BigtableSettings effectiveSettings, ClientHelper clientHelper);
 /// <summary>
 /// Creates a <see cref="BigtableClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="BigtableSettings"/>.</param>
 /// <returns>The created <see cref="BigtableClient"/>.</returns>
 public static BigtableClient Create(Channel channel, BigtableSettings settings = null)
 {
     GaxPreconditions.CheckNotNull(channel, nameof(channel));
     Bigtable.BigtableClient grpcClient = new Bigtable.BigtableClient(channel);
     return(new BigtableClientImpl(grpcClient, settings));
 }