@@ -320,7 +320,7 @@ public Blob internalCreateFrom(Path path, BlobInfo info, Opts<ObjectTargetOpt> o
320
320
ClientStreamingCallable <WriteObjectRequest , WriteObjectResponse > write =
321
321
storageClient .writeObjectCallable ().withDefaultCallContext (grpcCallContext );
322
322
323
- ApiFuture <ResumableWrite > start = startResumableWrite (grpcCallContext , req );
323
+ ApiFuture <ResumableWrite > start = startResumableWrite (grpcCallContext , req , opts );
324
324
ApiFuture <GrpcResumableSession > session2 =
325
325
ApiFutures .transform (
326
326
start ,
@@ -365,7 +365,7 @@ public Blob createFrom(
365
365
opts .grpcMetadataMapper ().apply (GrpcCallContext .createDefault ());
366
366
WriteObjectRequest req = getWriteObjectRequest (blobInfo , opts );
367
367
368
- ApiFuture <ResumableWrite > start = startResumableWrite (grpcCallContext , req );
368
+ ApiFuture <ResumableWrite > start = startResumableWrite (grpcCallContext , req , opts );
369
369
370
370
BufferedWritableByteChannelSession <WriteObjectResponse > session =
371
371
ResumableMedia .gapic ()
@@ -790,7 +790,7 @@ public GrpcBlobWriteChannel writer(BlobInfo blobInfo, BlobWriteOption... options
790
790
// in JSON, the starting of the resumable session happens before the invocation of write can
791
791
// happen. Emulate the same thing here.
792
792
// 1. create the future
793
- ApiFuture <ResumableWrite > startResumableWrite = startResumableWrite (grpcCallContext , req );
793
+ ApiFuture <ResumableWrite > startResumableWrite = startResumableWrite (grpcCallContext , req , opts );
794
794
// 2. await the result of the future
795
795
ResumableWrite resumableWrite = ApiFutureUtils .await (startResumableWrite );
796
796
// 3. wrap the result in another future container before constructing the BlobWriteChannel
@@ -1919,7 +1919,7 @@ private UnbufferedReadableByteChannelSession<Object> unbufferedReadSession(
1919
1919
1920
1920
@ VisibleForTesting
1921
1921
ApiFuture <ResumableWrite > startResumableWrite (
1922
- GrpcCallContext grpcCallContext , WriteObjectRequest req ) {
1922
+ GrpcCallContext grpcCallContext , WriteObjectRequest req , Opts < ObjectTargetOpt > opts ) {
1923
1923
Set <StatusCode .Code > codes = resultRetryAlgorithmToCodes (retryAlgorithmManager .getFor (req ));
1924
1924
GrpcCallContext merge = Utils .merge (grpcCallContext , Retrying .newCallContext ());
1925
1925
return ResumableMedia .gapic ()
@@ -1928,11 +1928,12 @@ ApiFuture<ResumableWrite> startResumableWrite(
1928
1928
storageClient
1929
1929
.startResumableWriteCallable ()
1930
1930
.withDefaultCallContext (merge .withRetryableCodes (codes )),
1931
- req );
1931
+ req ,
1932
+ opts );
1932
1933
}
1933
1934
1934
1935
ApiFuture <BidiResumableWrite > startResumableWrite (
1935
- GrpcCallContext grpcCallContext , BidiWriteObjectRequest req ) {
1936
+ GrpcCallContext grpcCallContext , BidiWriteObjectRequest req , Opts < ObjectTargetOpt > opts ) {
1936
1937
Set <StatusCode .Code > codes = resultRetryAlgorithmToCodes (retryAlgorithmManager .getFor (req ));
1937
1938
GrpcCallContext merge = Utils .merge (grpcCallContext , Retrying .newCallContext ());
1938
1939
return ResumableMedia .gapic ()
@@ -1941,7 +1942,8 @@ ApiFuture<BidiResumableWrite> startResumableWrite(
1941
1942
storageClient
1942
1943
.startResumableWriteCallable ()
1943
1944
.withDefaultCallContext (merge .withRetryableCodes (codes )),
1944
- req );
1945
+ req ,
1946
+ opts );
1945
1947
}
1946
1948
1947
1949
private SourceObject sourceObjectEncode (SourceBlob from ) {
0 commit comments