Skip to content

Commit d3b7bb3

Browse files
authored
docs: add @TransportCompatibility to StorageBatch (#2276)
1 parent 30bbc12 commit d3b7bb3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/StorageBatch.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.google.cloud.storage.Storage.BlobGetOption;
2424
import com.google.cloud.storage.Storage.BlobSourceOption;
2525
import com.google.cloud.storage.Storage.BlobTargetOption;
26+
import com.google.cloud.storage.TransportCompatibility.Transport;
2627
import com.google.cloud.storage.UnifiedOpts.Opts;
2728
import com.google.cloud.storage.spi.v1.RpcBatch;
2829
import com.google.cloud.storage.spi.v1.StorageRpc;
@@ -53,6 +54,7 @@
5354
* Blob blob = result.get(); // returns get result or throws StorageException
5455
* }</pre>
5556
*/
57+
@TransportCompatibility(Transport.HTTP)
5658
public class StorageBatch {
5759

5860
private final RpcBatch batch;
@@ -86,6 +88,7 @@ StorageOptions getOptions() {
8688
* {@code false} if the blob was not found, or throws a {@link StorageException} if the operation
8789
* failed.
8890
*/
91+
@TransportCompatibility(Transport.HTTP)
8992
public StorageBatchResult<Boolean> delete(
9093
String bucket, String blob, BlobSourceOption... options) {
9194
return delete(BlobId.of(bucket, blob), options);
@@ -97,6 +100,7 @@ public StorageBatchResult<Boolean> delete(
97100
* {@code false} if the blob was not found, or throws a {@link StorageException} if the operation
98101
* failed.
99102
*/
103+
@TransportCompatibility(Transport.HTTP)
100104
public StorageBatchResult<Boolean> delete(BlobId blob, BlobSourceOption... options) {
101105
StorageBatchResult<Boolean> result = new StorageBatchResult<>();
102106
RpcBatch.Callback<Void> callback = createDeleteCallback(result);
@@ -111,6 +115,7 @@ public StorageBatchResult<Boolean> delete(BlobId blob, BlobSourceOption... optio
111115
* {@link StorageBatchResult#get()} on the return value yields the updated {@link Blob} if
112116
* successful, or throws a {@link StorageException} if the operation failed.
113117
*/
118+
@TransportCompatibility(Transport.HTTP)
114119
public StorageBatchResult<Blob> update(BlobInfo blobInfo, BlobTargetOption... options) {
115120
StorageBatchResult<Blob> result = new StorageBatchResult<>();
116121
RpcBatch.Callback<StorageObject> callback = createUpdateCallback(this.options, result);
@@ -127,6 +132,7 @@ public StorageBatchResult<Blob> update(BlobInfo blobInfo, BlobTargetOption... op
127132
* {@code null} if no such blob exists, or throws a {@link StorageException} if the operation
128133
* failed.
129134
*/
135+
@TransportCompatibility(Transport.HTTP)
130136
public StorageBatchResult<Blob> get(String bucket, String blob, BlobGetOption... options) {
131137
return get(BlobId.of(bucket, blob), options);
132138
}
@@ -138,6 +144,7 @@ public StorageBatchResult<Blob> get(String bucket, String blob, BlobGetOption...
138144
* {@code null} if no such blob exists, or throws a {@link StorageException} if the operation
139145
* failed.
140146
*/
147+
@TransportCompatibility(Transport.HTTP)
141148
public StorageBatchResult<Blob> get(BlobId blob, BlobGetOption... options) {
142149
StorageBatchResult<Blob> result = new StorageBatchResult<>();
143150
RpcBatch.Callback<StorageObject> callback = createGetCallback(this.options, result);
@@ -147,6 +154,7 @@ public StorageBatchResult<Blob> get(BlobId blob, BlobGetOption... options) {
147154
}
148155

149156
/** Submits this batch for processing using a single RPC request. */
157+
@TransportCompatibility(Transport.HTTP)
150158
public void submit() {
151159
batch.submit();
152160
}

0 commit comments

Comments
 (0)