Share via


JobEnablePollerAsync Class

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

public final class JobEnablePollerAsync

Async poller class used by beginEnableJob to implement polling logic for enabling a BatchJob. Returns BatchJob values during polling and the final BatchJob upon successful completion.

Constructor Summary

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

Creates a new JobEnablePollerAsync.

Method Summary

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

Activation operation to start the enable process.

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

Cancel operation (not supported for enable).

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

Final result fetch operation.

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

Poll operation to check the job's enablement state.

Methods inherited from java.lang.Object

Constructor Details

JobEnablePollerAsync

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

Creates a new JobEnablePollerAsync.

Parameters:

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

Method Details

getActivationOperation

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

Activation operation to start the enable process.

Returns:

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

getCancelOperation

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

Cancel operation (not supported for enable).

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 enablement.

getPollOperation

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

Poll operation to check the job's enablement state.

Returns:

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

Applies to