Skip to content

Commit 11ffb2a

Browse files
committed
---
yaml --- r: 6151 b: refs/heads/tswast-patch-1 c: eb9ea81 h: refs/heads/master i: 6149: 99b1ec0 6147: 3a6af05 6143: b81efd6
1 parent 4d94a5a commit 11ffb2a

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 2e90926ac9042d6285704209eee1807ae273b2a8
60+
refs/heads/tswast-patch-1: eb9ea81f9e2aa52558db21642cff7fc656aa4316
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030

3131
/**
3232
* A Google cloud storage object.
33+
*
34+
* <p>
35+
* Objects of this class are immutable. Operations that modify the blob like {@link #update} and
36+
* {@link #copyTo} return a new object. To get a {@code Blob} object with the most recent
37+
* information use {@link #reload}.
38+
* </p>
3339
*/
3440
public final class Blob {
3541

@@ -151,7 +157,10 @@ public Blob reload(BlobSourceOption... options) {
151157
/**
152158
* Update the blob's information. Bucket or blob's name cannot be changed by this method. If you
153159
* want to rename the blob or move it to a different bucket use the {@link #copyTo} and
154-
* {@link #delete} operations. A new {@code Blob} object is returned.
160+
* {@link #delete} operations. A new {@code Blob} object is returned. By default no checks are
161+
* made on the metadata generation of the current blob. If you want to update the information only
162+
* if the current blob metadata are at their latest version use the {@code metagenerationMatch}
163+
* option: {@code blob.update(newInfo, BlobTargetOption.metagenerationMatch()}.
155164
*
156165
* @param blobInfo new blob's information. Bucket and blob names must match the current ones
157166
* @param options update options

branches/tswast-patch-1/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131

3232
/**
3333
* A Google cloud storage bucket.
34+
*
35+
* <p>
36+
* Objects of this class are immutable. Operations that modify the bucket like {@link #update}
37+
* return a new object. To get a {@code Bucket} object with the most recent information use
38+
* {@link #reload}.
39+
* </p>
3440
*/
3541
public final class Bucket {
3642

@@ -91,7 +97,10 @@ public Bucket reload(BucketSourceOption... options) {
9197

9298
/**
9399
* Update the bucket's information. Bucket's name cannot be changed. A new {@code Bucket} object
94-
* is returned.
100+
* is returned. By default no checks are made on the metadata generation of the current bucket.
101+
* If you want to update the information only if the current bucket metadata are at their latest
102+
* version use the {@code metagenerationMatch} option:
103+
* {@code bucket.update(newInfo, BucketTargetOption.metagenerationMatch());}
95104
*
96105
* @param bucketInfo new bucket's information. Name must match the one of the current bucket
97106
* @param options update options

0 commit comments

Comments
 (0)