Share via


JobDisablePollerAsync Class

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

public final class JobDisablePollerAsync

Async poller class used by beginDisableJob to implement polling logic for disabling a BatchJob. Returns BatchJob values during polling and as the final result.

Constructor Summary

Constructor Description
JobDisablePollerAsync(BatchAsyncClient batchAsyncClient, String jobId, BatchJobDisableParameters parameters, RequestOptions options)

Creates a new JobDisablePollerAsync.

Method Summary

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

Activation operation to start the disable.

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

Cancel operation (not supported for disable).

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

Final result fetch operation.

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

Poll operation to check the job's disablement state.

Methods inherited from java.lang.Object

Constructor Details

JobDisablePollerAsync

public JobDisablePollerAsync(BatchAsyncClient batchAsyncClient, String jobId, BatchJobDisableParameters parameters, RequestOptions options)

Creates a new JobDisablePollerAsync.

Parameters:

batchAsyncClient - The BatchAsyncClient used to interact with the Batch service.
jobId - The ID of the Job being disabled.
parameters - The options to use when disabling the Job.
options - Optional request options for service calls.

Method Details

getActivationOperation

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

Activation operation to start the disable.

Returns:

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

getCancelOperation

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

Cancel operation (not supported for disable).

Returns:

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

getFetchResultOperation

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

Final result fetch operation.

Returns:

A function that fetches the final BatchJob after successful disablement.

getPollOperation

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

Poll operation to check the job's disablement state.

Returns:

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

Applies to