@@ -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