File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
google-cloud-datastore/src/main/java/com/google/cloud/datastore Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ protected String getDefaultHost() {
122122 System .getProperty (
123123 com .google .datastore .v1 .client .DatastoreHelper .LOCAL_HOST_ENV_VAR ,
124124 System .getenv (com .google .datastore .v1 .client .DatastoreHelper .LOCAL_HOST_ENV_VAR ));
125- return host != null ? host : DatastoreDefaults . INSTANCE . getHost ();
125+ return host != null ? host : DatastoreSettings . getDefaultEndpoint ();
126126 }
127127
128128 @ Override
@@ -136,13 +136,6 @@ protected String getDefaultProject() {
136136
137137 private static class DatastoreDefaults implements ServiceDefaults <Datastore , DatastoreOptions > {
138138
139- private static final DatastoreDefaults INSTANCE = new DatastoreDefaults ();
140- private final String HOST = DatastoreSettings .getDefaultEndpoint ();
141-
142- String getHost () {
143- return HOST ;
144- }
145-
146139 @ Override
147140 public DatastoreFactory getDefaultServiceFactory () {
148141 return DefaultDatastoreFactory .INSTANCE ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2023 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
117package com .google .cloud .datastore .spi .v1 ;
218
319import static java .util .concurrent .TimeUnit .SECONDS ;
420
521import com .google .api .core .ApiFunction ;
22+ import com .google .api .core .InternalApi ;
623import com .google .api .gax .core .BackgroundResource ;
724import com .google .api .gax .core .GaxProperties ;
825import com .google .api .gax .grpc .GrpcCallContext ;
4360import java .io .IOException ;
4461import java .util .Collections ;
4562
46- // TODO(gapic_upgrade): Make it implement AutoCloseable
63+ @ InternalApi
4764public class GrpcDatastoreRpc implements AutoCloseable , DatastoreRpc {
4865
4966 private final GrpcDatastoreStub datastoreStub ;
You can’t perform that action at this time.
0 commit comments