Package com.google.api.gax.grpc (2.19.2)

Classes

ChannelPoolSettings

Settings to control ChannelPool behavior.

To facilitate low latency/high throughout applications, gax provides a ChannelPool. The pool is meant to facilitate high throughput/low latency clients. By splitting load across multiple gRPC channels the client can spread load across multiple frontends and overcome gRPC's limit of 100 concurrent RPCs per channel. However oversizing the ChannelPool can lead to underutilized channels which will lead to high tail latency due to GFEs disconnecting idle channels.

The ChannelPool is designed to adapt to varying traffic patterns by tracking outstanding RPCs and resizing the pool size. This class configures the behavior. In general clients should aim to have less than 50 concurrent RPCs per channel and at least 1 outstanding per channel per minute.

The settings in this class will be applied every minute.

ChannelPoolSettings.Builder

GaxGrpcProperties

Provides properties of the GAX-GRPC library.

GrpcCallContext

GrpcCallContext encapsulates context data used to make a grpc call.

GrpcCallContext is immutable in the sense that none of its methods modifies the GrpcCallContext itself or the underlying data. Methods of the form withX, such as #withTransportChannel, return copies of the object, but with one field changed. The immutability and thread safety of the arguments solely depends on the arguments themselves.

GrpcCallSettings<RequestT,ResponseT>

Grpc-specific settings for creating callables.

GrpcCallSettings.Builder<RequestT,ResponseT>

GrpcCallableFactory

Class with utility methods to create grpc-based direct callables.

GrpcHeaderInterceptor

An interceptor to handle custom headers.

Package-private for internal usage.

GrpcRawCallableFactory

Class with utility methods to create low level grpc-based direct callables.

GrpcResponseMetadata

GrpcResponseMetadata provides a mechanism to access the headers and trailers returned by a gRPC client method.

NOTE: the GrpcResponseMetadata class is not thread-safe and should NOT be re-used for multiple calls. A new instance of GrpcResponseMetadata should be constructed for each call that requires metadata to be accessed.

Example usage:

 
 GrpcResponseMetadata grpcResponseMetadata = new GrpcResponseMetadata();
 Foo foo = client.getFooCallable().call(getFooRequest, grpcResponseMetadata.createContextWithHandlers());
 Metadata headers = grpcResponseMetadata.getMetadata();
 Metadata trailers = grpcResponseMetadata.getTrailingMetadata();
 
 

GrpcStatusCode

A failure code specific to a gRPC call.

GrpcTransportChannel

Implementation of TransportChannel based on gRPC.

GrpcTransportChannel.Builder

InstantiatingGrpcChannelProvider

InstantiatingGrpcChannelProvider is a TransportChannelProvider which constructs a gRPC ManagedChannel with a number of configured inputs every time getChannel(...) is called. These inputs include a port, a service address, and credentials.

The credentials can either be supplied directly (by providing a FixedCredentialsProvider to Builder.setCredentialsProvider()) or acquired implicitly from Application Default Credentials (by providing a GoogleCredentialsProvider to Builder.setCredentialsProvider()).

The client lib header and generator header values are used to form a value that goes into the http header of requests to the service.

InstantiatingGrpcChannelProvider.Builder

ProtoOperationTransformers

Public for technical reasons; intended for use by generated code.

ProtoOperationTransformers.MetadataTransformer<MetadataT>

ProtoOperationTransformers.ResponseTransformer<ResponseT>

Interfaces

ChannelFactory

This interface represents a factory for creating one ManagedChannel

This is public only for technical reasons, for advanced usage.

ChannelPrimer

An interface to prepare a ManagedChannel for normal requests by priming the channel

This is public only for technical reasons, for advanced usage.

GrpcInterceptorProvider

Provider of custom gRPC ClientInterceptors.

GrpcStubCallableFactory

ResponseMetadataHandler

An interface to handle metadata returned from an RPC. A ResponseMetadataHandler is used by the GrpcMetadataHandlerInterceptor class to provide custom handling of the returned headers and trailers.