Package com.google.cloud.spanner.spi.v1 (6.111.0)

GitHub Repository

This package is not the recommended entry point to using this client library!

For this library, we recommend using com.google.cloud.spanner for new applications.

Classes

Class Description
com.google.cloud.spanner.spi.v1.ChannelFinder Finds a server for a request using location-aware routing metadata.

This component is per-database and maintains both recipe and range caches.

com.google.cloud.spanner.spi.v1.GapicSpannerRpc Implementation of Cloud Spanner remote calls using Gapic libraries.
com.google.cloud.spanner.spi.v1.KeyRangeCache Cache for routing information used by location-aware routing.
com.google.cloud.spanner.spi.v1.KeyRecipe
com.google.cloud.spanner.spi.v1.KeyRecipeCache
com.google.cloud.spanner.spi.v1.SpannerErrorInterceptor Adds error details to statuses returned by the Cloud Spanner API. TODO(user): Add integration tests to check for error details.
com.google.cloud.spanner.spi.v1.SpannerInterceptorProvider For internal use only. An interceptor provider that provides a list of grpc interceptors for GapicSpannerRpc to handle logging and error augmentation by intercepting grpc calls.
com.google.cloud.spanner.spi.v1.SpannerRpc.Paginated Represents results from paginated RPCs, i.e., those where up to a maximum number of items is returned from each call and a followup call must be made to fetch more.
com.google.cloud.spanner.spi.v1.SpannerRpcViews
com.google.cloud.spanner.spi.v1.SsFormat Sortable String Format encoding utilities for Spanner keys.

This class provides methods to encode various data types into a byte format that preserves lexicographic ordering. The encoding supports both increasing and decreasing sort orders.

com.google.cloud.spanner.spi.v1.TargetRange Represents a key range with start and limit boundaries for routing.
com.google.cloud.spanner.spi.v1.TraceContextInterceptor Intercepts all gRPC calls and injects trace context related headers to propagate trace context to Spanner. This class takes reference from OpenTelemetry's JAVA instrumentation library for gRPC. https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/9ecf7965aa455d41ea8cc0761b6c6b6eeb106324/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/TracingClientInterceptor.java#L27
com.google.cloud.spanner.spi.v1.UnsynchronizedByteArrayOutputStream A simple, unsynchronized byte array output stream optimized for key encoding.

Unlike java.io.ByteArrayOutputStream, this class is not thread-safe and does not incur synchronization overhead. This provides better performance for single-threaded key encoding

Interfaces

Interface Description
com.google.cloud.spanner.spi.v1.ChannelEndpoint Represents a Spanner server endpoint for location-aware routing.

Each instance wraps a gRPC ManagedChannel connected to a specific Spanner server. The ChannelEndpointCache creates and caches these instances.

com.google.cloud.spanner.spi.v1.ChannelEndpointCache Cache for server connections used in location-aware routing.

Implementations are expected to cache ChannelEndpoint instances such that repeated calls with the same address return the same instance. This allows routing components to

com.google.cloud.spanner.spi.v1.ChannelEndpointCacheFactory Factory for creating ChannelEndpointCache instances.
com.google.cloud.spanner.spi.v1.SpannerRpc Abstracts remote calls to the Cloud Spanner service. Typically end-consumer code will never use this interface; it's main purpose is to abstract the implementation of the public Cloud Spanner API from the underlying transport mechanism.
com.google.cloud.spanner.spi.v1.SpannerRpc.ResultStreamConsumer Consumer for the results produced by a streaming read or query call.
com.google.cloud.spanner.spi.v1.SpannerRpc.StreamingCall Handle for cancellation of a streaming read or query call.

Enums

Enum Description
com.google.cloud.spanner.spi.v1.KeyRangeCache.RangeMode Determines how to handle ranges that span multiple splits.
com.google.cloud.spanner.spi.v1.SpannerRpc.Option Options passed in SpannerRpc methods to control how an RPC is issued.