@@ -346,12 +346,30 @@ public GrpcStorageOptions.Builder toBuilder() {
346
346
347
347
@ Override
348
348
public int hashCode () {
349
- return baseHashCode ();
349
+ return Objects .hash (
350
+ retryAlgorithmManager ,
351
+ terminationAwaitDuration ,
352
+ attemptDirectPath ,
353
+ grpcInterceptorProvider ,
354
+ blobWriteSessionConfig ,
355
+ baseHashCode ());
350
356
}
351
357
352
358
@ Override
353
- public boolean equals (Object obj ) {
354
- return obj instanceof GrpcStorageOptions && baseEquals ((GrpcStorageOptions ) obj );
359
+ public boolean equals (Object o ) {
360
+ if (this == o ) {
361
+ return true ;
362
+ }
363
+ if (!(o instanceof GrpcStorageOptions )) {
364
+ return false ;
365
+ }
366
+ GrpcStorageOptions that = (GrpcStorageOptions ) o ;
367
+ return attemptDirectPath == that .attemptDirectPath
368
+ && Objects .equals (retryAlgorithmManager , that .retryAlgorithmManager )
369
+ && Objects .equals (terminationAwaitDuration , that .terminationAwaitDuration )
370
+ && Objects .equals (grpcInterceptorProvider , that .grpcInterceptorProvider )
371
+ && Objects .equals (blobWriteSessionConfig , that .blobWriteSessionConfig )
372
+ && this .baseEquals (that );
355
373
}
356
374
357
375
/** @since 2.14.0 This new api is in preview and is subject to breaking changes. */
@@ -399,6 +417,12 @@ public static final class Builder extends StorageOptions.Builder {
399
417
400
418
Builder (StorageOptions options ) {
401
419
super (options );
420
+ GrpcStorageOptions gso = (GrpcStorageOptions ) options ;
421
+ this .storageRetryStrategy = gso .getRetryAlgorithmManager ().retryStrategy ;
422
+ this .terminationAwaitDuration = gso .getTerminationAwaitDuration ();
423
+ this .attemptDirectPath = gso .attemptDirectPath ;
424
+ this .grpcInterceptorProvider = gso .grpcInterceptorProvider ;
425
+ this .blobWriteSessionConfig = gso .blobWriteSessionConfig ;
402
426
}
403
427
404
428
/**
0 commit comments