Package com.databricks.jdbc.common.util

## Class VolumeRetryUtil

- java.lang.Object
- - com.databricks.jdbc.common.util.VolumeRetryUtil

    public class VolumeRetryUtil
    extends Object

Utility class for volume operation retry logic. Centralizes retry decision logic for both presigned URL requests and upload operations.

### Field Summary

Fields
`static int` `MAX_RETRIES` Maximum number of retry attempts for volume operations.

### Constructor Summary

Constructors
`VolumeRetryUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`static int` `getRetryTimeoutSeconds​(IDatabricksConnectionContext connectionContext)` Get the retry timeout in seconds.
`static boolean` `isRetryableHttpCode​(int statusCode, IDatabricksConnectionContext connectionContext)` Check if the given HTTP status code is retryable.
`static boolean` `shouldRetry​(int attempt, long retryStartTime, IDatabricksConnectionContext connectionContext)` Check if we should retry based on attempt count and elapsed time.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MAX_RETRIES

    public static final int MAX_RETRIES

Maximum number of retry attempts for volume operations.

See Also:
  Constant Field Values

### Constructor Detail

#### VolumeRetryUtil

    public VolumeRetryUtil()

### Method Detail

#### isRetryableHttpCode

    public static boolean isRetryableHttpCode​(int statusCode,
                                              IDatabricksConnectionContext connectionContext)

Check if the given HTTP status code is retryable.

Parameters:
  `statusCode` - The HTTP status code to check
  `connectionContext` - The connection context (can be null for tests)
Returns:
  true if the status code is retryable, false otherwise

#### shouldRetry

    public static boolean shouldRetry​(int attempt,
                                      long retryStartTime,
                                      IDatabricksConnectionContext connectionContext)

Check if we should retry based on attempt count and elapsed time.

Parameters:
  `attempt` - Current attempt number (1-based)
  `retryStartTime` - Start time of the retry sequence in milliseconds
  `connectionContext` - The connection context (can be null for tests)
Returns:
  true if we should retry, false otherwise

#### getRetryTimeoutSeconds

    public static int getRetryTimeoutSeconds​(IDatabricksConnectionContext connectionContext)

Get the retry timeout in seconds.

Parameters:
  `connectionContext` - The connection context (can be null for tests)
Returns:
  The retry timeout in seconds