Package com.databricks.jdbc.api.impl.volume

## Class VolumeUploadCallback

- java.lang.Object
- - com.databricks.jdbc.api.impl.volume.VolumeUploadCallback

All Implemented Interfaces:
  `org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>`

    public class VolumeUploadCallback
    extends Object
    implements org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>

Unified callback for both file and stream uploads to DBFS volumes. Handles retry logic for failed uploads with exponential backoff.

### Nested Class Summary

Nested Classes
`static interface` `VolumeUploadCallback.UrlGenerator` Interface for generating presigned URLs.

### Constructor Summary

Constructors
`VolumeUploadCallback​(IDatabricksHttpClient httpClient, CompletableFuture<VolumePutResult> uploadFuture, DBFSVolumeClient.UploadRequest request, Semaphore semaphore, VolumeUploadCallback.UrlGenerator urlGenerator, Function<Integer,​Long> retryDelayCalculator, IDatabricksConnectionContext connectionContext)` Constructor for the callback.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `cancelled()`
`void` `completed​(org.apache.hc.client5.http.async.methods.SimpleHttpResponse uploadResult)`
`void` `failed​(Exception ex)`

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

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

### Constructor Detail

#### VolumeUploadCallback

    public VolumeUploadCallback​(IDatabricksHttpClient httpClient,
                                CompletableFuture<VolumePutResult> uploadFuture,
                                DBFSVolumeClient.UploadRequest request,
                                Semaphore semaphore,
                                VolumeUploadCallback.UrlGenerator urlGenerator,
                                Function<Integer,​Long> retryDelayCalculator,
                                IDatabricksConnectionContext connectionContext)

Constructor for the callback.

Parameters:
  `httpClient` - The HTTP client for making requests
  `uploadFuture` - Future to complete when upload is done
  `request` - The upload request with file or stream details
  `semaphore` - Semaphore for controlling concurrency
  `urlGenerator` - Function to generate presigned URLs
  `retryDelayCalculator` - Function to calculate retry delays

### Method Detail

#### completed

    public void completed​(org.apache.hc.client5.http.async.methods.SimpleHttpResponse uploadResult)

Specified by:
  `completed` in interface `org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>`

#### failed

    public void failed​(Exception ex)

Specified by:
  `failed` in interface `org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>`

#### cancelled

    public void cancelled()

Specified by:
  `cancelled` in interface `org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>`