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 ClassesModifier and TypeClassDescriptionstatic interfaceInterface for generating presigned URLs. -
Constructor Summary
ConstructorsConstructorDescriptionVolumeUploadCallback(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
-
Constructor Details
-
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 Details
-
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
- 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>
-