Skip to content

Commit 5b98115

Browse files
cshaff0524igorbernstein2
authored andcommitted
Bigtable: Update javadoc (#5178)
1 parent 07c3d62 commit 5b98115

4 files changed

Lines changed: 80 additions & 79 deletions

File tree

google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
import javax.annotation.Nonnull;
5757

5858
/**
59-
* Client for creating, configuring and delete Cloud Bigtable instances (including AppProfiles and
60-
* Clusters).
59+
* Client for creating, configuring and deleting Cloud Bigtable instances, app profiles, and
60+
* clusters.
6161
*
6262
* <p>See the individual methods for example code.
6363
*
@@ -102,13 +102,13 @@ public final class BigtableInstanceAdminClient implements AutoCloseable {
102102
private final String projectId;
103103
private final BigtableInstanceAdminStub stub;
104104

105-
/** Constructs an instance of BigtableInstanceAdminClient with the given project id. */
105+
/** Constructs an instance of BigtableInstanceAdminClient with the given project ID. */
106106
public static BigtableInstanceAdminClient create(@Nonnull String projectId) throws IOException {
107107
return create(BigtableInstanceAdminSettings.newBuilder().setProjectId(projectId).build());
108108
}
109109

110110
/**
111-
* Constructs an instance of BigtableInstanceAdminClient with the given project id.
111+
* Constructs an instance of BigtableInstanceAdminClient with the given project ID.
112112
*
113113
* @deprecated Please use {@link #create(String)}.
114114
*/
@@ -124,14 +124,14 @@ public static BigtableInstanceAdminClient create(@Nonnull BigtableInstanceAdminS
124124
return create(settings.getProjectId(), settings.getStubSettings().createStub());
125125
}
126126

127-
/** Constructs an instance of BigtableInstanceAdminClient with the given project id and stub. */
127+
/** Constructs an instance of BigtableInstanceAdminClient with the given project ID and stub. */
128128
public static BigtableInstanceAdminClient create(
129129
@Nonnull String projectId, @Nonnull BigtableInstanceAdminStub stub) {
130130
return new BigtableInstanceAdminClient(projectId, stub);
131131
}
132132

133133
/**
134-
* Constructs an instance of BigtableInstanceAdminClient with the given ProjectName and stub.
134+
* Constructs an instance of BigtableInstanceAdminClient with the given project name and stub.
135135
*
136136
* @deprecated Please use {@link #create(String, BigtableInstanceAdminStub)}.
137137
*/
@@ -148,13 +148,13 @@ private BigtableInstanceAdminClient(
148148
this.stub = stub;
149149
}
150150

151-
/** Gets the project id this client is associated with. */
151+
/** Gets the project ID this client is associated with. */
152152
public String getProjectId() {
153153
return projectId;
154154
}
155155

156156
/**
157-
* Gets the ProjectName this client is associated with.
157+
* Gets the project name this client is associated with.
158158
*
159159
* @deprecated Please use {@link #getProjectId()}.
160160
*/
@@ -312,7 +312,7 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) {
312312
* Lists all of the instances in the current project.
313313
*
314314
* <p>This method will throw a {@link PartialListInstancesException} when any zone is unavailable.
315-
* If partial listing are ok, the exception can be caught and inspected.
315+
* If a partial list is OK, the exception can be caught and inspected.
316316
*
317317
* <p>Sample code:
318318
*
@@ -334,7 +334,7 @@ public List<Instance> listInstances() {
334334
* Asynchronously lists all of the instances in the current project.
335335
*
336336
* <p>This method will throw a {@link PartialListInstancesException} when any zone is unavailable.
337-
* If partial listing are ok, the exception can be caught and inspected.
337+
* If a partial list is OK, the exception can be caught and inspected.
338338
*
339339
* <p>Sample code:
340340
*
@@ -373,7 +373,7 @@ public ApiFuture<List<Instance>> listInstancesAsync() {
373373
new ApiFunction<com.google.bigtable.admin.v2.ListInstancesResponse, List<Instance>>() {
374374
@Override
375375
public List<Instance> apply(com.google.bigtable.admin.v2.ListInstancesResponse proto) {
376-
// NOTE: pagination is intentionally ignored. The server does not implement it and never
376+
// NOTE: Pagination is intentionally ignored. The server does not implement it and never
377377
// will.
378378
Verify.verify(
379379
proto.getNextPageToken().isEmpty(),
@@ -445,7 +445,7 @@ public Void apply(Empty input) {
445445
}
446446

447447
/**
448-
* Checks if the instance specified by the instanceId exists
448+
* Checks if the instance specified by the instance ID exists.
449449
*
450450
* <p>Sample code:
451451
*
@@ -460,7 +460,7 @@ public boolean exists(String instanceId) {
460460
}
461461

462462
/**
463-
* Asynchronously checks if the instance specified by the instanceId exists
463+
* Asynchronously checks if the instance specified by the instance ID exists.
464464
*
465465
* <p>Sample code:
466466
*
@@ -561,7 +561,7 @@ public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) {
561561
}
562562

563563
/**
564-
* Get the cluster representation by ID.
564+
* Gets the cluster representation by ID.
565565
*
566566
* <p>Sample code:
567567
*
@@ -606,7 +606,7 @@ public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) {
606606
* Lists all clusters in the specified instance.
607607
*
608608
* <p>This method will throw a {@link PartialListClustersException} when any zone is unavailable.
609-
* If partial listing are ok, the exception can be caught and inspected.
609+
* If a partial list is OK, the exception can be caught and inspected.
610610
*
611611
* <p>Sample code:
612612
*
@@ -628,7 +628,7 @@ public List<Cluster> listClusters(String instanceId) {
628628
* Asynchronously lists all clusters in the specified instance.
629629
*
630630
* <p>This method will throw a {@link PartialListClustersException} when any zone is unavailable.
631-
* If partial listing are ok, the exception can be caught and inspected.
631+
* If a partial list is OK, the exception can be caught and inspected.
632632
*
633633
* <p>Sample code:
634634
*
@@ -663,7 +663,7 @@ public ApiFuture<List<Cluster>> listClustersAsync(String instanceId) {
663663
new ApiFunction<com.google.bigtable.admin.v2.ListClustersResponse, List<Cluster>>() {
664664
@Override
665665
public List<Cluster> apply(com.google.bigtable.admin.v2.ListClustersResponse proto) {
666-
// NOTE: serverside pagination is not and will not be implemented, so remaining pages
666+
// NOTE: Server-side pagination is not and will not be implemented, so remaining pages
667667
// are not fetched. However, if that assumption turns out to be wrong, fail fast to
668668
// avoid returning partial data.
669669
Verify.verify(
@@ -691,7 +691,7 @@ public List<Cluster> apply(com.google.bigtable.admin.v2.ListClustersResponse pro
691691
}
692692

693693
/**
694-
* Resizes the cluster's node count. Please note that only clusters that belong to a PRODUCTION
694+
* Modifies the cluster's node count. Please note that only clusters that belong to a production
695695
* instance can be resized.
696696
*
697697
* <p>Sample code:
@@ -707,8 +707,8 @@ public Cluster resizeCluster(String instanceId, String clusterId, int numServeNo
707707
}
708708

709709
/**
710-
* Asynchronously resizes the cluster's node count. Please note that only clusters that belong to
711-
* a PRODUCTION instance can be resized.
710+
* Asynchronously modifies the cluster's node count. Please note that only clusters that belong to
711+
* a production instance can be resized.
712712
*
713713
* <pre>{@code
714714
* ApiFuture<Cluster> clusterFuture = client.resizeCluster("my-instance", "my-cluster", 30);
@@ -834,7 +834,7 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) {
834834
}
835835

836836
/**
837-
* Get the app profile by id.
837+
* Gets the app profile by ID.
838838
*
839839
* <p>Sample code:
840840
*
@@ -850,7 +850,7 @@ public AppProfile getAppProfile(String instanceId, String appProfileId) {
850850
}
851851

852852
/**
853-
* Asynchronously get the app profile by id.
853+
* Asynchronously gets the app profile by ID.
854854
*
855855
* <p>Sample code:
856856
*
@@ -919,7 +919,7 @@ public ApiFuture<List<AppProfile>> listAppProfilesAsync(String instanceId) {
919919
// TODO(igorbernstein2): try to upstream pagination spooling or figure out a way to expose the
920920
// paginated responses while maintaining the wrapper facade.
921921

922-
// Fetch the first page.
922+
// Fetches the first page.
923923
ApiFuture<ListAppProfilesPage> firstPageFuture =
924924
ApiFutures.transform(
925925
stub.listAppProfilesPagedCallable().futureCall(request),
@@ -931,7 +931,7 @@ public ListAppProfilesPage apply(ListAppProfilesPagedResponse response) {
931931
},
932932
MoreExecutors.directExecutor());
933933

934-
// Fetch the rest of the pages by chaining the futures.
934+
// Fetches the rest of the pages by chaining the futures.
935935
ApiFuture<List<com.google.bigtable.admin.v2.AppProfile>> allProtos =
936936
ApiFutures.transformAsync(
937937
firstPageFuture,
@@ -958,7 +958,7 @@ public ApiFuture<List<com.google.bigtable.admin.v2.AppProfile>> apply(
958958
},
959959
MoreExecutors.directExecutor());
960960

961-
// Wrap all of the accumulated protos.
961+
// Wraps all of the accumulated protos.
962962
return ApiFutures.transform(
963963
allProtos,
964964
new ApiFunction<List<com.google.bigtable.admin.v2.AppProfile>, List<AppProfile>>() {
@@ -1307,9 +1307,9 @@ public List<String> testIamPermission(ResourceName resourceName, String... permi
13071307
}
13081308

13091309
/**
1310-
* Asynchronously tests whether the caller has the given permissions for the the specified
1311-
* absolute resource name (note that the current project of the client is ignored). Returns a
1312-
* subset of the specified permissions that the caller has.
1310+
* Asynchronously tests whether the caller has the given permissions for the specified absolute
1311+
* resource name (note that the current project of the client is ignored). Returns a subset of the
1312+
* specified permissions that the caller has.
13131313
*
13141314
* <p>Sample code:
13151315
*

google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Settings class to configure an instance of {@link BigtableInstanceAdminClient}.
2828
*
29-
* <p>It must be configured with a project id and can be used to change default RPC settings.
29+
* <p>It must be configured with a project ID and can be used to change default RPC settings.
3030
*
3131
* <p>Example usage:
3232
*
@@ -48,20 +48,20 @@ public final class BigtableInstanceAdminSettings {
4848
private final BigtableInstanceAdminStubSettings stubSettings;
4949

5050
private BigtableInstanceAdminSettings(Builder builder) throws IOException {
51-
Preconditions.checkNotNull(builder.projectId, "Project ud must be set");
51+
Preconditions.checkNotNull(builder.projectId, "Project ID must be set");
5252
Verify.verifyNotNull(builder.stubSettings, "stubSettings should never be null");
5353

5454
this.projectId = builder.projectId;
5555
this.stubSettings = builder.stubSettings.build();
5656
}
5757

58-
/** Gets the id of the project whose instances the client will manage. */
58+
/** Gets the ID of the project whose instances the client will manage. */
5959
@Nonnull
6060
public String getProjectId() {
6161
return projectId;
6262
}
6363

64-
/** Gets the CredentialsProvider to use for getting the credentials to make calls with. */
64+
/** Gets the credentials provider to use for getting the credentials to make calls with. */
6565
public CredentialsProvider getCredentialsProvider() {
6666
return stubSettings.getCredentialsProvider();
6767
}
@@ -96,14 +96,14 @@ private Builder(BigtableInstanceAdminSettings settings) {
9696
this.stubSettings = settings.stubSettings.toBuilder();
9797
}
9898

99-
/** Sets the id of the project whose instances the client will manage. */
99+
/** Sets the ID of the project whose instances the client will manage. */
100100
public Builder setProjectId(@Nonnull String projectId) {
101101
Preconditions.checkNotNull(projectId);
102102
this.projectId = projectId;
103103
return this;
104104
}
105105

106-
/** Gets the id of the project whose instances the client will manage. */
106+
/** Gets the ID of the project whose instances the client will manage. */
107107
@Nullable
108108
public String getProjectId() {
109109
return projectId;

0 commit comments

Comments
 (0)