Share via


JobDeletePollerAsync Class

  • java.lang.Object
    • com.azure.compute.batch.JobDeletePollerAsync

public final class JobDeletePollerAsync

Async poller class used by beginDeleteJob to implement polling logic for deleting a BatchJob. Returns BatchJob values during polling and null upon successful deletion.

Constructor Summary

Constructor Description
JobDeletePollerAsync(BatchAsyncClient batchAsyncClient, String jobId, RequestOptions options)

Creates a new JobDeletePollerAsync.

Method Summary

Modifier and Type Method and Description
Function<PollingContext<BatchJob>,Mono<PollResponse<BatchJob>>> getActivationOperation()

Activation operation to start the delete.

BiFunction<PollingContext<BatchJob>,PollResponse<BatchJob>,Mono<BatchJob>> getCancelOperation()

Cancel operation (not supported for delete).

Function<PollingContext<BatchJob>,Mono<Void>> getFetchResultOperation()

Final result fetch operation (returns null; not required).

Function<PollingContext<BatchJob>,Mono<PollResponse<BatchJob>>> getPollOperation()

Poll operation to check if the job is still being deleted or is gone.

Methods inherited from java.lang.Object

Constructor Details

JobDeletePollerAsync

public JobDeletePollerAsync(BatchAsyncClient batchAsyncClient, String jobId, RequestOptions options)

Creates a new JobDeletePollerAsync.

Parameters:

batchAsyncClient - The BatchAsyncClient used to interact with the Batch service.
jobId - The ID of the Job being deleted.
options - Optional request options for service calls.

Method Details

getActivationOperation

public Function<PollingContext<BatchJob>,Mono<PollResponse<BatchJob>>> getActivationOperation()

Activation operation to start the delete.

Returns:

A function that initiates the delete request and returns a PollResponse with IN_PROGRESS status.

getCancelOperation

public BiFunction<PollingContext<BatchJob>,PollResponse<BatchJob>,Mono<BatchJob>> getCancelOperation()

Cancel operation (not supported for delete).

Returns:

A function that always returns an empty Mono, indicating cancellation is unsupported.

getFetchResultOperation

public Function<PollingContext<BatchJob>,Mono<Void>> getFetchResultOperation()

Final result fetch operation (returns null; not required).

Returns:

A function that returns an empty Mono, indicating no final fetch is required.

getPollOperation

public Function<PollingContext<BatchJob>,Mono<PollResponse<BatchJob>>> getPollOperation()

Poll operation to check if the job is still being deleted or is gone.

Returns:

A function that polls the job and returns a PollResponse with the current operation status.

Applies to