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 Modifier and Type Class Description static interfaceVolumeUploadCallback.UrlGeneratorInterface for generating presigned URLs.
-
Constructor Summary
Constructors Constructor Description 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 Modifier and Type Method Description voidcancelled()voidcompleted(org.apache.hc.client5.http.async.methods.SimpleHttpResponse uploadResult)voidfailed(Exception ex)
-
-
-
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 requestsuploadFuture- Future to complete when upload is donerequest- The upload request with file or stream detailssemaphore- Semaphore for controlling concurrencyurlGenerator- Function to generate presigned URLsretryDelayCalculator- Function to calculate retry delays
-
-
Method Detail
-
completed
public void completed(org.apache.hc.client5.http.async.methods.SimpleHttpResponse uploadResult)
- Specified by:
completedin interfaceorg.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>
-
failed
public void failed(Exception ex)
- Specified by:
failedin interfaceorg.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>
-
cancelled
public void cancelled()
- Specified by:
cancelledin interfaceorg.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.client5.http.async.methods.SimpleHttpResponse>
-
-