File tree 2 files changed +19
-9
lines changed
google-cloud-datastore/src/main/java/com/google/cloud/datastore
2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ protected String getDefaultHost() {
122
122
System .getProperty (
123
123
com .google .datastore .v1 .client .DatastoreHelper .LOCAL_HOST_ENV_VAR ,
124
124
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 ();
126
126
}
127
127
128
128
@ Override
@@ -136,13 +136,6 @@ protected String getDefaultProject() {
136
136
137
137
private static class DatastoreDefaults implements ServiceDefaults <Datastore , DatastoreOptions > {
138
138
139
- private static final DatastoreDefaults INSTANCE = new DatastoreDefaults ();
140
- private final String HOST = DatastoreSettings .getDefaultEndpoint ();
141
-
142
- String getHost () {
143
- return HOST ;
144
- }
145
-
146
139
@ Override
147
140
public DatastoreFactory getDefaultServiceFactory () {
148
141
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
+
1
17
package com .google .cloud .datastore .spi .v1 ;
2
18
3
19
import static java .util .concurrent .TimeUnit .SECONDS ;
4
20
5
21
import com .google .api .core .ApiFunction ;
22
+ import com .google .api .core .InternalApi ;
6
23
import com .google .api .gax .core .BackgroundResource ;
7
24
import com .google .api .gax .core .GaxProperties ;
8
25
import com .google .api .gax .grpc .GrpcCallContext ;
43
60
import java .io .IOException ;
44
61
import java .util .Collections ;
45
62
46
- // TODO(gapic_upgrade): Make it implement AutoCloseable
63
+ @ InternalApi
47
64
public class GrpcDatastoreRpc implements AutoCloseable , DatastoreRpc {
48
65
49
66
private final GrpcDatastoreStub datastoreStub ;
You can’t perform that action at this time.
0 commit comments