# Class SpannerGrpc (6.118.0)

6.118.0 (latest) 6.116.0 6.111.1 6.108.0 6.107.0 6.103.0 6.102.1 6.101.1 6.100.0 6.99.0 6.98.1 6.97.1 6.96.1 6.95.1 6.94.0 6.93.0 6.89.0 6.88.0 6.87.0 6.86.0 6.85.0 6.83.0 6.82.0 6.80.1 6.79.0 6.77.0 6.74.1 6.72.0 6.71.0 6.69.0 6.68.0 6.66.0 6.65.1 6.62.0 6.60.0 6.58.0 6.57.0 6.56.0 6.55.0 6.54.0 6.53.0 6.52.1 6.51.0 6.50.1 6.49.0 6.25.1 6.24.0 6.23.4 6.22.0 6.21.2 6.20.0 6.19.1 6.18.0 6.17.4 6.14.1

    public final class SpannerGrpc

Cloud Spanner API
The Cloud Spanner API can be used to manage sessions and execute
transactions on data stored in Cloud Spanner databases.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> SpannerGrpc

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Fields

### SERVICE_NAME

    public static final String SERVICE_NAME

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

## Static Methods

### bindService(SpannerGrpc.AsyncService service)

    public static final ServerServiceDefinition bindService(SpannerGrpc.AsyncService service)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `service` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.SpannerGrpc.AsyncService` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.ServerServiceDefinition` |   |

### getBatchCreateSessionsMethod()

    public static MethodDescriptor<BatchCreateSessionsRequest,BatchCreateSessionsResponse> getBatchCreateSessionsMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.BatchCreateSessionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.BatchCreateSessionsResponse>` |   |

### getBatchWriteMethod()

    public static MethodDescriptor<BatchWriteRequest,BatchWriteResponse> getBatchWriteMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.BatchWriteRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.BatchWriteResponse>` |   |

### getBeginTransactionMethod()

    public static MethodDescriptor<BeginTransactionRequest,Transaction> getBeginTransactionMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.BeginTransactionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.Transaction>` |   |

### getCommitMethod()

    public static MethodDescriptor<CommitRequest,CommitResponse> getCommitMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CommitRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CommitResponse>` |   |

### getCreateSessionMethod()

    public static MethodDescriptor<CreateSessionRequest,Session> getCreateSessionMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CreateSessionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.Session>` |   |

### getDeleteSessionMethod()

    public static MethodDescriptor<DeleteSessionRequest,Empty> getDeleteSessionMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.DeleteSessionRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getExecuteBatchDmlMethod()

    public static MethodDescriptor<ExecuteBatchDmlRequest,ExecuteBatchDmlResponse> getExecuteBatchDmlMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ExecuteBatchDmlRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ExecuteBatchDmlResponse>` |   |

### getExecuteSqlMethod()

    public static MethodDescriptor<ExecuteSqlRequest,ResultSet> getExecuteSqlMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ExecuteSqlRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ResultSet>` |   |

### getExecuteStreamingSqlMethod()

    public static MethodDescriptor<ExecuteSqlRequest,PartialResultSet> getExecuteStreamingSqlMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ExecuteSqlRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.PartialResultSet>` |   |

### getFetchCacheUpdateMethod()

    public static MethodDescriptor<FetchCacheUpdateRequest,CacheUpdate> getFetchCacheUpdateMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.FetchCacheUpdateRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CacheUpdate>` |   |

### getGetSessionMethod()

    public static MethodDescriptor<GetSessionRequest,Session> getGetSessionMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.GetSessionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.Session>` |   |

### getListSessionsMethod()

    public static MethodDescriptor<ListSessionsRequest,ListSessionsResponse> getListSessionsMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ListSessionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ListSessionsResponse>` |   |

### getPartitionQueryMethod()

    public static MethodDescriptor<PartitionQueryRequest,PartitionResponse> getPartitionQueryMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.PartitionQueryRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.PartitionResponse>` |   |

### getPartitionReadMethod()

    public static MethodDescriptor<PartitionReadRequest,PartitionResponse> getPartitionReadMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.PartitionReadRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.PartitionResponse>` |   |

### getReadMethod()

    public static MethodDescriptor<ReadRequest,ResultSet> getReadMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ReadRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ResultSet>` |   |

### getRollbackMethod()

    public static MethodDescriptor<RollbackRequest,Empty> getRollbackMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.RollbackRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getServiceDescriptor()

    public static ServiceDescriptor getServiceDescriptor()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.ServiceDescriptor` |   |

### getStreamingReadMethod()

    public static MethodDescriptor<ReadRequest,PartialResultSet> getStreamingReadMethod()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.MethodDescriptor<https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ReadRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.PartialResultSet>` |   |

### newBlockingStub(Channel channel)

    public static SpannerGrpc.SpannerBlockingStub newBlockingStub(Channel channel)

Creates a new blocking-style stub that supports unary and streaming output calls on the service

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `io.grpc.Channel` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.SpannerGrpc.SpannerBlockingStub` |   |

### newBlockingV2Stub(Channel channel)

    public static SpannerGrpc.SpannerBlockingV2Stub newBlockingV2Stub(Channel channel)

Creates a new blocking-style stub that supports all types of calls on the service

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `io.grpc.Channel` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.SpannerGrpc.SpannerBlockingV2Stub` |   |

### newFutureStub(Channel channel)

    public static SpannerGrpc.SpannerFutureStub newFutureStub(Channel channel)

Creates a new ListenableFuture-style stub that supports unary calls on the service

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `io.grpc.Channel` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.SpannerGrpc.SpannerFutureStub` |   |

### newStub(Channel channel)

    public static SpannerGrpc.SpannerStub newStub(Channel channel)

Creates a new async stub that supports all call types for the service

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `io.grpc.Channel` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.SpannerGrpc.SpannerStub` |   |