Skip to content

Commit eca61e2

Browse files
committed
---
yaml --- r: 2449 b: refs/heads/update-datastore c: 93dd0c2 h: refs/heads/master i: 2447: b46b4a2
1 parent d056e59 commit eca61e2

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

  • branches/update-datastore/gcloud-java-storage/src/main/java/com/google/gcloud/storage

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3
66
refs/heads/pubsub-alpha: 1a0e970f265af871e02274085b9662b3fe29058b
77
refs/heads/resource-manager: ebf4adc5ee835cd2086c4ac5b4e78d01a5a005a7
8-
refs/heads/update-datastore: dde30aaf085b0cf3a6615af0495309b2596e488f
8+
refs/heads/update-datastore: 93dd0c244fdbc6843ed2fc43912fa55a4c9e6258
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
1010
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
1111
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2

branches/update-datastore/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public final class Blob {
5050
private final Storage storage;
5151
private final BlobInfo info;
5252

53+
/**
54+
* Class for specifying blob source options when {@code Blob} methods are used.
55+
*/
5356
public static class BlobSourceOption extends Option {
5457

5558
private static final long serialVersionUID = 214616862061934846L;
@@ -88,18 +91,34 @@ private Storage.BlobGetOption toGetOption(BlobInfo blobInfo) {
8891
}
8992
}
9093

94+
/**
95+
* Returns an option for blob's generation match. If this option is used the request will fail
96+
* if generation does not match.
97+
*/
9198
public static BlobSourceOption generationMatch() {
9299
return new BlobSourceOption(StorageRpc.Option.IF_GENERATION_MATCH);
93100
}
94101

102+
/**
103+
* Returns an option for blob's generation mismatch. If this option is used the request will
104+
* fail if generation matches.
105+
*/
95106
public static BlobSourceOption generationNotMatch() {
96107
return new BlobSourceOption(StorageRpc.Option.IF_GENERATION_NOT_MATCH);
97108
}
98109

110+
/**
111+
* Returns an option for blob's metageneration match. If this option is used the request will
112+
* fail if metageneration does not match.
113+
*/
99114
public static BlobSourceOption metagenerationMatch() {
100115
return new BlobSourceOption(StorageRpc.Option.IF_METAGENERATION_MATCH);
101116
}
102117

118+
/**
119+
* Returns an option for blob's metageneration mismatch. If this option is used the request will
120+
* fail if metageneration matches.
121+
*/
103122
public static BlobSourceOption metagenerationNotMatch() {
104123
return new BlobSourceOption(StorageRpc.Option.IF_METAGENERATION_NOT_MATCH);
105124
}

0 commit comments

Comments
 (0)