Skip to content

Commit

Permalink
Update Blob and Bucket javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Sep 25, 2015
1 parent 2e90926 commit 925aab9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@

/**
* A Google cloud storage object.
*
* <p>
* Objects of this class are immutable. Operations that modify the blob like {@link #update} and
* {@link #copyTo} return a new object. To get a {@code Blob} object with the most recent
* information use {@link #reload}.
* </p>
*/
public final class Blob {

Expand Down Expand Up @@ -151,7 +157,10 @@ public Blob reload(BlobSourceOption... options) {
/**
* Update the blob's information. Bucket or blob's name cannot be changed by this method. If you
* want to rename the blob or move it to a different bucket use the {@link #copyTo} and
* {@link #delete} operations. A new {@code Blob} object is returned.
* {@link #delete} operations. A new {@code Blob} object is returned. By default no checks are
* made on the metadata generation of the current blob. If you want to update the information only
* if the current blob metadata are at their latest version use the {@code metagenerationMatch}
* option: {@code blob.update(newInfo, BlobTargetOption.metagenerationMatch()}.
*
* @param blobInfo new blob's information. Bucket and blob names must match the current ones
* @param options update options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@

/**
* A Google cloud storage bucket.
*
* <p>
* Objects of this class are immutable. Operations that modify the bucket like {@link #update}
* return a new object. To get a {@code Bucket} object with the most recent information use
* {@link #reload}.
* </p>
*/
public final class Bucket {

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

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

0 comments on commit 925aab9

Please sign in to comment.