Skip to content

Commit 2f59326

Browse files
committed
---
yaml --- r: 9779 b: refs/heads/spanner-gapic-migration c: 4d23ca6 h: refs/heads/master i: 9777: fa3bbfe 9775: 68d7143
1 parent 8f4bf25 commit 2f59326

26 files changed

Lines changed: 1266 additions & 289 deletions

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ refs/tags/v0.34.0: bf31760a31a66acb239322a70dcd03dbe1d0c7ca
8080
refs/tags/v0.35.0: c28951c5f4cc97a1be07900d19df6984115a4bd6
8181
refs/tags/v0.36.0: 6b75c61f73e6827b3ca379bd54f88f750290162f
8282
refs/tags/v0.37.0: db2e142f92601709fdd48db159776f905742e30f
83-
refs/heads/spanner-gapic-migration: d39325260d19dd274d33ec51b239c230803b7cb0
83+
refs/heads/spanner-gapic-migration: 4d23ca6688ed22a7fd2aa4f0e643bae7b274127f
8484
refs/tags/v0.38.0: c235ee4df5e1248e1769dae3f86a0d7ab7fd8301
8585
refs/tags/v0.39.0: ab231c9d22475242a43d6d9554aa4a3f736dab01
8686
refs/tags/v0.40.0: a1d5b05206cce7734365f1b910396a2c9d6605ec

branches/spanner-gapic-migration/google-cloud-bom/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,33 +145,33 @@
145145
<dependency>
146146
<groupId>com.google.api</groupId>
147147
<artifactId>api-common</artifactId>
148-
<version>1.5.0</version>
148+
<version>1.6.0</version>
149149
</dependency>
150150
<dependency>
151151
<groupId>com.google.api</groupId>
152152
<artifactId>gax</artifactId>
153-
<version>1.25.0</version>
153+
<version>1.26.0</version>
154154
</dependency>
155155
<dependency>
156156
<groupId>com.google.api</groupId>
157157
<artifactId>gax-grpc</artifactId>
158-
<version>1.25.0</version>
158+
<version>1.26.0</version>
159159
</dependency>
160160
<dependency>
161161
<groupId>com.google.api</groupId>
162162
<artifactId>gax-grpc</artifactId>
163-
<version>1.25.0</version>
163+
<version>1.26.0</version>
164164
<classifier>testlib</classifier>
165165
</dependency>
166166
<dependency>
167167
<groupId>com.google.api</groupId>
168168
<artifactId>gax-httpjson</artifactId>
169-
<version>0.42.0</version>
169+
<version>0.43.0</version>
170170
</dependency>
171171
<dependency>
172172
<groupId>com.google.api</groupId>
173173
<artifactId>gax-httpjson</artifactId>
174-
<version>0.42.0</version>
174+
<version>0.43.0</version>
175175
<classifier>testlib</classifier>
176176
</dependency>
177177
<dependency>

branches/spanner-gapic-migration/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.google.cloud.spanner.SpannerImpl.MultiUseReadOnlyTransaction;
2424
import com.google.cloud.spanner.SpannerImpl.SessionImpl;
2525
import com.google.cloud.spanner.spi.v1.SpannerRpc;
26+
import com.google.cloud.spanner.spi.v1.GapicSpannerRpc;
2627
import com.google.common.base.Preconditions;
2728
import com.google.common.collect.ImmutableList;
2829
import com.google.protobuf.Struct;
@@ -68,7 +69,7 @@ private static class BatchReadOnlyTransactionImpl extends MultiUseReadOnlyTransa
6869
super(
6970
checkNotNull(session),
7071
checkNotNull(bound),
71-
checkNotNull(spanner).getOptions().getSpannerRpcV1(),
72+
checkNotNull(spanner).getOptions().getGapicSpannerRpc(),
7273
spanner.getOptions().getPrefetchChunks());
7374
this.sessionName = session.getName();
7475
this.options = session.getOptions();
@@ -81,7 +82,7 @@ private static class BatchReadOnlyTransactionImpl extends MultiUseReadOnlyTransa
8182
checkNotNull(session),
8283
checkNotNull(batchTransactionId).getTransactionId(),
8384
batchTransactionId.getTimestamp(),
84-
checkNotNull(spanner).getOptions().getSpannerRpcV1(),
85+
checkNotNull(spanner).getOptions().getGapicSpannerRpc(),
8586
spanner.getOptions().getPrefetchChunks());
8687
this.sessionName = session.getName();
8788
this.options = session.getOptions();

branches/spanner-gapic-migration/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Database.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static com.google.common.base.Preconditions.checkArgument;
2020

21+
import com.google.api.gax.longrunning.OperationFuture;
2122
import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata;
2223

2324
/**
@@ -51,7 +52,7 @@ public Database reload() throws SpannerException {
5152
* one. This must be unique within a database abd must be a valid identifier
5253
* [a-zA-Z][a-zA-Z0-9_]*.
5354
*/
54-
public Operation<Void, UpdateDatabaseDdlMetadata> updateDdl(
55+
public OperationFuture<Void, UpdateDatabaseDdlMetadata> updateDdl(
5556
Iterable<String> statements, String operationId) throws SpannerException {
5657
return dbClient.updateDatabaseDdl(instance(), database(), statements, operationId);
5758
}

branches/spanner-gapic-migration/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseAdminClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.spanner;
1818

19+
import com.google.api.gax.longrunning.OperationFuture;
1920
import com.google.api.gax.paging.Page;
2021
import com.google.cloud.spanner.Options.ListOption;
2122
import com.google.spanner.admin.database.v1.CreateDatabaseMetadata;
@@ -58,7 +59,7 @@ public interface DatabaseAdminClient {
5859
* @param statements DDL statements to run while creating the database, for example {@code CREATE
5960
* TABLE MyTable ( ... )}. This should not include {@code CREATE DATABASE} statement.
6061
*/
61-
Operation<Database, CreateDatabaseMetadata> createDatabase(
62+
OperationFuture<Database, CreateDatabaseMetadata> createDatabase(
6263
String instanceId, String databaseId, Iterable<String> statements) throws SpannerException;
6364

6465
/**
@@ -97,7 +98,7 @@ Operation<Database, CreateDatabaseMetadata> createDatabase(
9798
* one. This must be unique within a database abd must be a valid identifier
9899
* [a-zA-Z][a-zA-Z0-9_]*.
99100
*/
100-
Operation<Void, UpdateDatabaseDdlMetadata> updateDatabaseDdl(
101+
OperationFuture<Void, UpdateDatabaseDdlMetadata> updateDatabaseDdl(
101102
String instanceId,
102103
String databaseId,
103104
Iterable<String> statements,

branches/spanner-gapic-migration/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Instance.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.spanner;
1818

19+
import com.google.api.gax.longrunning.OperationFuture;
1920
import com.google.api.gax.paging.Page;
2021
import com.google.spanner.admin.database.v1.CreateDatabaseMetadata;
2122
import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata;
@@ -104,7 +105,7 @@ public void delete() {
104105
instanceClient.deleteInstance(instanceId());
105106
}
106107

107-
public Operation<Instance, UpdateInstanceMetadata> update(
108+
public OperationFuture<Instance, UpdateInstanceMetadata> update(
108109
InstanceInfo.InstanceField... fieldsToUpdate) {
109110
return instanceClient.updateInstance(this, fieldsToUpdate);
110111
}
@@ -125,7 +126,7 @@ public Database getDatabase(String databaseId) {
125126
* @param statements DDL statements to run while creating the database, for example {@code CREATE
126127
* TABLE MyTable ( ... )}. This should not include {@code CREATE DATABASE} statement.
127128
*/
128-
public Operation<Database, CreateDatabaseMetadata> createDatabase(
129+
public OperationFuture<Database, CreateDatabaseMetadata> createDatabase(
129130
String databaseId, Iterable<String> statements) throws SpannerException {
130131
return dbClient.createDatabase(instanceId(), databaseId, statements);
131132
}

branches/spanner-gapic-migration/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceAdminClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.spanner;
1818

19+
import com.google.api.gax.longrunning.OperationFuture;
1920
import com.google.api.gax.paging.Page;
2021
import com.google.cloud.spanner.Options.ListOption;
2122
import com.google.spanner.admin.instance.v1.CreateInstanceMetadata;
@@ -59,7 +60,7 @@ public interface InstanceAdminClient {
5960
* <li> The instance's allocated resource levels are readable via the
6061
* </ul>
6162
*/
62-
Operation<Instance, CreateInstanceMetadata> createInstance(InstanceInfo instance)
63+
OperationFuture<Instance, CreateInstanceMetadata> createInstance(InstanceInfo instance)
6364
throws SpannerException;
6465

6566
/** Gets an instance. */
@@ -113,7 +114,7 @@ Operation<Instance, CreateInstanceMetadata> createInstance(InstanceInfo instance
113114
* <li> The instance's new resource levels are readable via the API.
114115
* </ul>
115116
*/
116-
Operation<Instance, UpdateInstanceMetadata> updateInstance(
117+
OperationFuture<Instance, UpdateInstanceMetadata> updateInstance(
117118
InstanceInfo instance, InstanceInfo.InstanceField... fieldsToUpdate);
118119

119120
/** Returns a builder for {@code Instance} object with the given id. */

0 commit comments

Comments
 (0)