# 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
Modifier and Type
Field
Description
`static final int`
`MAX_RETRIES`
Maximum number of retry attempts for volume operations.

## Constructor Summary

Constructors
Constructor
Description
`VolumeRetryUtil()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### MAX_RETRIES

public static final int MAX_RETRIES
Maximum number of retry attempts for volume operations.

See Also:
  - Constant Field Values

## Constructor Details

### VolumeRetryUtil

public VolumeRetryUtil()

## Method Details

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