Skip to content

Commit 1942af9

Browse files
igorbernstein2pongad
authored andcommitted
bigtable: rename surface (googleapis#2934)
wrappers -> models Add Async suffix Fixes googleapis#2916 Fixes googleapis#2917
1 parent 7131ecc commit 1942af9

31 files changed

+84
-84
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
import com.google.api.gax.rpc.UnaryCallable;
2424
import com.google.bigtable.admin.v2.InstanceName;
2525
import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub;
26-
import com.google.cloud.bigtable.data.v2.wrappers.KeyOffset;
27-
import com.google.cloud.bigtable.data.v2.wrappers.Query;
28-
import com.google.cloud.bigtable.data.v2.wrappers.Row;
29-
import com.google.cloud.bigtable.data.v2.wrappers.RowAdapter;
30-
import com.google.cloud.bigtable.data.v2.wrappers.RowMutation;
26+
import com.google.cloud.bigtable.data.v2.models.KeyOffset;
27+
import com.google.cloud.bigtable.data.v2.models.Query;
28+
import com.google.cloud.bigtable.data.v2.models.Row;
29+
import com.google.cloud.bigtable.data.v2.models.RowAdapter;
30+
import com.google.cloud.bigtable.data.v2.models.RowMutation;
3131
import java.io.IOException;
3232
import java.util.List;
3333

@@ -129,7 +129,7 @@ public static BigtableDataClient create(BigtableDataSettings settings) throws IO
129129
*
130130
* <pre>{@code
131131
* // Import the filter DSL
132-
* import static com.google.cloud.bigtable.data.v2.wrappers.Filters.FILTERS;
132+
* import static com.google.cloud.bigtable.data.v2.models.Filters.FILTERS;
133133
*
134134
* InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
135135
* try (BigtableClient bigtableClient = BigtableClient.create(instanceName)) {
@@ -148,7 +148,7 @@ public static BigtableDataClient create(BigtableDataSettings settings) throws IO
148148
*
149149
* @see ServerStreamingCallable For call styles.
150150
* @see Query For query options.
151-
* @see com.google.cloud.bigtable.data.v2.wrappers.Filters For the filter building DSL.
151+
* @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL.
152152
*/
153153
public ServerStream<Row> readRows(Query query) {
154154
return readRowsCallable().call(query);
@@ -216,7 +216,7 @@ public void readRowsAsync(Query query, ResponseObserver<Row> observer) {
216216
*
217217
* @see ServerStreamingCallable For call styles.
218218
* @see Query For query options.
219-
* @see com.google.cloud.bigtable.data.v2.wrappers.Filters For the filter building DSL.
219+
* @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL.
220220
*/
221221
public ServerStreamingCallable<Query, Row> readRowsCallable() {
222222
return stub.readRowsCallable();
@@ -246,7 +246,7 @@ public ServerStreamingCallable<Query, Row> readRowsCallable() {
246246
*
247247
* @see ServerStreamingCallable For call styles.
248248
* @see Query For query options.
249-
* @see com.google.cloud.bigtable.data.v2.wrappers.Filters For the filter building DSL.
249+
* @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL.
250250
*/
251251
public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<RowT> rowAdapter) {
252252
return stub.createReadRowsCallable(rowAdapter);
@@ -262,11 +262,11 @@ public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<R
262262
* <pre>{@code
263263
* InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
264264
* try (BigtableClient bigtableClient = BigtableClient.create(instanceName)) {
265-
* ApiFuture<List<KeyOffset>> keyOffsets = bigtableClient.sampleRowKeys("[TABLE]");
265+
* ApiFuture<List<KeyOffset>> keyOffsets = bigtableClient.sampleRowKeysAsync("[TABLE]");
266266
* }
267267
* }</pre>
268268
*/
269-
public ApiFuture<List<KeyOffset>> sampleRowKeys(String tableId) {
269+
public ApiFuture<List<KeyOffset>> sampleRowKeysAsync(String tableId) {
270270
return sampleRowKeysCallable().futureCall(tableId);
271271
}
272272

@@ -305,11 +305,11 @@ public UnaryCallable<String, List<KeyOffset>> sampleRowKeysCallable() {
305305
* RowMutation mutation = RowMutation.create("[TABLE]", "[ROW KEY]")
306306
* .setCell("[FAMILY NAME]", "[QUALIFIER]", "[VALUE]");
307307
*
308-
* ApitFuture<Void> future = bigtableClient.mutateRow(mutation);
308+
* ApitFuture<Void> future = bigtableClient.mutateRowAsync(mutation);
309309
* }
310310
* }</pre>
311311
*/
312-
public ApiFuture<Void> mutateRow(RowMutation rowMutation) {
312+
public ApiFuture<Void> mutateRowAsync(RowMutation rowMutation) {
313313
return mutateRowCallable().futureCall(rowMutation);
314314
}
315315

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
import com.google.api.gax.rpc.UnaryCallSettings;
2121
import com.google.bigtable.admin.v2.InstanceName;
2222
import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings;
23-
import com.google.cloud.bigtable.data.v2.wrappers.KeyOffset;
24-
import com.google.cloud.bigtable.data.v2.wrappers.Query;
25-
import com.google.cloud.bigtable.data.v2.wrappers.Row;
26-
import com.google.cloud.bigtable.data.v2.wrappers.RowMutation;
23+
import com.google.cloud.bigtable.data.v2.models.KeyOffset;
24+
import com.google.cloud.bigtable.data.v2.models.Query;
25+
import com.google.cloud.bigtable.data.v2.models.Row;
26+
import com.google.cloud.bigtable.data.v2.models.RowMutation;
2727
import java.io.IOException;
2828
import java.util.List;
2929
import javax.annotation.Nonnull;

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.google.bigtable.admin.v2.InstanceName;
2121

2222
/**
23-
* Contains information necessary to construct Bigtable protobuf requests from user facing wrappers.
23+
* Contains information necessary to construct Bigtable protobuf requests from user facing models.
2424
*
2525
* <p>The intention is to extract repetitive details like instance names and app profiles into a
2626
* configurable values in {@link com.google.cloud.bigtable.data.v2.BigtableDataSettings} and expose

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/DefaultRowAdapter.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

1818
import com.google.common.collect.ImmutableList;
1919
import com.google.protobuf.ByteString;

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/Filters.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Filters.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

1818
import com.google.api.core.InternalApi;
1919
import com.google.api.core.InternalExtensionOnly;
2020
import com.google.bigtable.v2.ColumnRange;
2121
import com.google.bigtable.v2.RowFilter;
2222
import com.google.bigtable.v2.ValueRange;
2323
import com.google.cloud.bigtable.data.v2.internal.RegexUtil;
24-
import com.google.cloud.bigtable.data.v2.wrappers.Range.AbstractByteStringRange;
25-
import com.google.cloud.bigtable.data.v2.wrappers.Range.AbstractTimestampRange;
24+
import com.google.cloud.bigtable.data.v2.models.Range.AbstractByteStringRange;
25+
import com.google.cloud.bigtable.data.v2.models.Range.AbstractTimestampRange;
2626
import com.google.common.base.Preconditions;
2727
import com.google.protobuf.ByteString;
2828
import javax.annotation.Nonnull;
@@ -36,7 +36,7 @@
3636
* <p>Sample code:
3737
*
3838
* <pre>{@code
39-
* import static com.google.cloud.bigtable.data.v2.wrappers.Filters.FILTERS;
39+
* import static com.google.cloud.bigtable.data.v2.models.Filters.FILTERS;
4040
*
4141
* void main() {
4242
* // Build the filter expression

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/KeyOffset.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/KeyOffset.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

1818
import com.google.api.core.InternalApi;
1919
import com.google.auto.value.AutoValue;
@@ -29,7 +29,7 @@ public static KeyOffset create(ByteString key, long offsetBytes) {
2929

3030
/**
3131
* A row key value that is returned as part of the response of {@link
32-
* com.google.cloud.bigtable.data.v2.BigtableDataClient#sampleRowKeys(String)}. The key represents
32+
* com.google.cloud.bigtable.data.v2.BigtableDataClient#sampleRowKeysAsync(String)}. The key represents
3333
* end boundary of one of the contiguous sections in a list of approximately equal sized sections.
3434
*
3535
* <p>Note that row key may not have ever been written to or read from, and users should therefore

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/Mutation.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

1818
import com.google.bigtable.v2.Mutation.DeleteFromColumn;
1919
import com.google.bigtable.v2.Mutation.DeleteFromFamily;
2020
import com.google.bigtable.v2.Mutation.DeleteFromRow;
2121
import com.google.bigtable.v2.Mutation.SetCell;
22-
import com.google.cloud.bigtable.data.v2.wrappers.Range.TimestampRange;
22+
import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange;
2323
import com.google.common.base.Preconditions;
2424
import com.google.common.collect.ImmutableList;
2525
import com.google.protobuf.ByteString;

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/MutationApi.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MutationApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

18-
import com.google.cloud.bigtable.data.v2.wrappers.Range.TimestampRange;
18+
import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange;
1919
import com.google.protobuf.ByteString;
2020
import javax.annotation.Nonnull;
2121

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/Query.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

1818
import com.google.api.core.InternalApi;
1919
import com.google.bigtable.v2.ReadRowsRequest;
2020
import com.google.bigtable.v2.RowRange;
2121
import com.google.bigtable.v2.TableName;
2222
import com.google.cloud.bigtable.data.v2.internal.RequestContext;
23-
import com.google.cloud.bigtable.data.v2.wrappers.Range.ByteStringRange;
23+
import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange;
2424
import com.google.common.base.Preconditions;
2525
import com.google.protobuf.ByteString;
2626

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/wrappers/Range.java renamed to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.google.cloud.bigtable.data.v2.wrappers;
16+
package com.google.cloud.bigtable.data.v2.models;
1717

1818
import com.google.common.base.Preconditions;
1919
import com.google.protobuf.ByteString;

0 commit comments

Comments
 (0)