Skip to content

Commit 809465c

Browse files
committed
review changes
1 parent b06a3df commit 809465c

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/BackupInfo.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected Builder setMaxExpireTime(Timestamp maxExpireTime) {
100100
*
101101
* <p>Returns the names of the destination backups being created by copying this source backup.
102102
*/
103-
protected Builder addAllReferencingBackups(List<String> referencingBackup) {
103+
protected Builder addAllReferencingBackups(List<String> referencingBackups) {
104104
throw new UnsupportedOperationException("Unimplemented");
105105
}
106106
}
@@ -116,7 +116,7 @@ abstract static class BuilderImpl extends Builder {
116116
private EncryptionInfo encryptionInfo;
117117
private com.google.spanner.admin.database.v1.Backup proto;
118118
private Timestamp maxExpireTime;
119-
private List<String> referencingBackup;
119+
private List<String> referencingBackups;
120120

121121
BuilderImpl(BackupId id) {
122122
this.id = Preconditions.checkNotNull(id);
@@ -133,7 +133,7 @@ abstract static class BuilderImpl extends Builder {
133133
this.encryptionInfo = other.encryptionInfo;
134134
this.proto = other.proto;
135135
this.maxExpireTime = other.maxExpireTime;
136-
this.referencingBackup = other.referencingBackup;
136+
this.referencingBackups = other.referencingBackups;
137137
}
138138

139139
@Override
@@ -188,14 +188,14 @@ Builder setProto(@Nullable com.google.spanner.admin.database.v1.Backup proto) {
188188
}
189189

190190
@Override
191-
public Builder setMaxExpireTime(Timestamp maxExpireTime) {
191+
protected Builder setMaxExpireTime(Timestamp maxExpireTime) {
192192
this.maxExpireTime = Preconditions.checkNotNull(maxExpireTime);
193193
return this;
194194
}
195195

196196
@Override
197-
public Builder addAllReferencingBackups(List<String> referencingBackup) {
198-
this.referencingBackup = Preconditions.checkNotNull(referencingBackup);
197+
protected Builder addAllReferencingBackups(List<String> referencingBackups) {
198+
this.referencingBackups = Preconditions.checkNotNull(referencingBackups);
199199
return this;
200200
}
201201
}
@@ -220,7 +220,7 @@ public enum State {
220220
private final EncryptionInfo encryptionInfo;
221221
private final com.google.spanner.admin.database.v1.Backup proto;
222222
private final Timestamp maxExpireTime;
223-
private final List<String> referencingBackup;
223+
private final List<String> referencingBackups;
224224

225225
BackupInfo(BuilderImpl builder) {
226226
this.id = builder.id;
@@ -233,7 +233,7 @@ public enum State {
233233
this.database = builder.database;
234234
this.proto = builder.proto;
235235
this.maxExpireTime = builder.maxExpireTime;
236-
this.referencingBackup = builder.referencingBackup;
236+
this.referencingBackups = builder.referencingBackups;
237237
}
238238

239239
/** Returns the backup id. */
@@ -301,8 +301,8 @@ public Timestamp getMaxExpireTime() {
301301
* Returns the names of the destination backups being created by copying this source backup {@link
302302
* Backup}.
303303
*/
304-
public List<String> getReferencingBackup() {
305-
return referencingBackup;
304+
public List<String> getReferencingBackups() {
305+
return referencingBackups;
306306
}
307307

308308
@Override
@@ -323,7 +323,7 @@ public boolean equals(Object o) {
323323
&& Objects.equals(versionTime, that.versionTime)
324324
&& Objects.equals(database, that.database)
325325
&& Objects.equals(maxExpireTime, that.maxExpireTime)
326-
&& Objects.equals(referencingBackup, that.referencingBackup);
326+
&& Objects.equals(referencingBackups, that.referencingBackups);
327327
}
328328

329329
@Override
@@ -338,7 +338,7 @@ public int hashCode() {
338338
versionTime,
339339
database,
340340
maxExpireTime,
341-
referencingBackup);
341+
referencingBackups);
342342
}
343343

344344
@Override
@@ -354,6 +354,6 @@ public String toString() {
354354
versionTime,
355355
database,
356356
maxExpireTime,
357-
referencingBackup);
357+
referencingBackups);
358358
}
359359
}

google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseAdminClient.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
import com.google.cloud.Timestamp;
2323
import com.google.cloud.spanner.Options.ListOption;
2424
import com.google.longrunning.Operation;
25-
import com.google.spanner.admin.database.v1.*;
25+
import com.google.spanner.admin.database.v1.CopyBackupMetadata;
26+
import com.google.spanner.admin.database.v1.CreateBackupMetadata;
27+
import com.google.spanner.admin.database.v1.CreateDatabaseMetadata;
28+
import com.google.spanner.admin.database.v1.CreateDatabaseRequest;
29+
import com.google.spanner.admin.database.v1.RestoreDatabaseMetadata;
30+
import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata;
2631
import java.util.List;
2732
import javax.annotation.Nullable;
2833

@@ -206,8 +211,8 @@ default OperationFuture<Backup, CopyBackupMetadata> copyBackup(
206211
}
207212

208213
/**
209-
* Creates a copy of backup from an existing backup in Cloud Spanner. Any configuration options in
210-
* the {@link Backup} instance will be included in the {@link
214+
* Creates a copy of backup from an existing backup in Cloud Spanner in the same instance. Any
215+
* configuration options in the {@link Backup} instance will be included in the {@link
211216
* com.google.spanner.admin.database.v1.CopyBackupRequest}.
212217
*
213218
* <p>The expire time of the new backup must be set and be at least 6 hours and at most 366 days

0 commit comments

Comments
 (0)