4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    public sealed class GcpCallInvokerPool

A pool of GCP call invokers for the same service, but with potentially different endpoints and/or channel options.
Each endpoint/options pair has a single [GcpCallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp.GcpCallInvoker.md.txt). All call invokers created by this pool use
default application credentials. This class is thread-safe.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> GcpCallInvokerPool

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax.Grpc.Gcp](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp.md.txt)

## Assembly

Google.Api.Gax.Grpc.dll

## Constructors

### GcpCallInvokerPool(ServiceMetadata)

    public GcpCallInvokerPool(ServiceMetadata serviceMetadata)

Creates a call invoker pool which will use the given service metadata to determine scopes
and self-signed JWT support.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `serviceMetadata` | `ServiceMetadata` The metadata for the service that this pool will be used with. Must not be null. |

## Methods

### GetCallInvoker(string, GrpcChannelOptions, ApiConfig, GrpcAdapter)

    [Obsolete("Please use the overloads that accept a universe domain to make certain the credentials used are valid in the target universe domain.")]
    public GcpCallInvoker GetCallInvoker(string endpoint, GrpcChannelOptions options, ApiConfig apiConfig, GrpcAdapter adapter)

Returns a call invoker from this pool, creating a new one if there is no call invoker
already associated with `endpoint` and `options`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `endpoint` | `string` The endpoint to connect to. Must not be null. |
| `options` | `GrpcChannelOptions` The options to use for each channel created by the call invoker. May be null. |
| `apiConfig` | `ApiConfig` The API configuration used to determine channel keys. Must not be null. |
| `adapter` | `GrpcAdapter` The gRPC adapter to use to create call invokers. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GcpCallInvoker` | A call invoker for the specified endpoint. |

### GetCallInvoker(string, string, GrpcChannelOptions, ApiConfig, GrpcAdapter)

    public GcpCallInvoker GetCallInvoker(string universeDomain, string endpoint, GrpcChannelOptions options, ApiConfig apiConfig, GrpcAdapter adapter)

Returns a call invoker from this pool, creating a new one if there is no call invoker
already associated with `endpoint` and `options`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `universeDomain` | `string` The universe domain configured for the service client, to validate against the one configured for the credential. Must not be null. |
| `endpoint` | `string` The endpoint to connect to. Must not be null. |
| `options` | `GrpcChannelOptions` The options to use for each channel created by the call invoker. May be null. |
| `apiConfig` | `ApiConfig` The API configuration used to determine channel keys. Must not be null. |
| `adapter` | `GrpcAdapter` The gRPC adapter to use to create call invokers. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GcpCallInvoker` | A call invoker for the specified endpoint. |

### GetCallInvokerAsync(string, GrpcChannelOptions, ApiConfig, GrpcAdapter)

    [Obsolete("Please use the overloads that accept a universe domain to make certain the credentials used are valid in the target universe domain.")]
    public Task<GcpCallInvoker> GetCallInvokerAsync(string endpoint, GrpcChannelOptions options, ApiConfig apiConfig, GrpcAdapter adapter)

Asynchronously returns a call invoker from this pool, creating a new one if there is no call invoker
already associated with `endpoint` and `options`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `endpoint` | `string` The endpoint to connect to. Must not be null. |
| `options` | `GrpcChannelOptions` The options to use for each channel created by the call invoker. May be null. |
| `apiConfig` | `ApiConfig` The API configuration used to determine channel keys. Must not be null. |
| `adapter` | `GrpcAdapter` The gRPC adapter to use to create call invokers. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskGcpCallInvoker` | A task representing the asynchronous operation. The value of the completed task will be a call invoker for the specified endpoint. |

### GetCallInvokerAsync(string, string, GrpcChannelOptions, ApiConfig, GrpcAdapter, CancellationToken)

    public Task<GcpCallInvoker> GetCallInvokerAsync(string universeDomain, string endpoint, GrpcChannelOptions options, ApiConfig apiConfig, GrpcAdapter adapter, CancellationToken cancellationToken)

Asynchronously returns a call invoker from this pool, creating a new one if there is no call invoker
already associated with `endpoint` and `options`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `universeDomain` | `string` The universe domain configured for the service client, to validate against the one configured for the credential. Must not be null. |
| `endpoint` | `string` The endpoint to connect to. Must not be null. |
| `options` | `GrpcChannelOptions` The options to use for each channel created by the call invoker. May be null. |
| `apiConfig` | `ApiConfig` The API configuration used to determine channel keys. Must not be null. |
| `adapter` | `GrpcAdapter` The gRPC adapter to use to create call invokers. Must not be null. |
| `cancellationToken` | `CancellationToken` The cancellation token to cancel the operation. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskGcpCallInvoker` | A task representing the asynchronous operation. The value of the completed task will be a call invoker for the specified endpoint. |

### ShutdownChannelsAsync()

    public Task ShutdownChannelsAsync()

Shuts down all the open channels of all currently-allocated call invokers asynchronously. This does not prevent
the call invoker pool from being used later on, but the currently-allocated call invokers will not be reused.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A task which will complete when all the (current) channels have been shut down. |