Share via


JobScheduleTerminatePollerAsync Class

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

public final class JobScheduleTerminatePollerAsync

Async poller class used by beginTerminateJobSchedule to implement polling logic for terminating a BatchJobSchedule. Returns BatchJobSchedule values during polling and as the final result.

Constructor Summary

Constructor Description
JobScheduleTerminatePollerAsync(BatchAsyncClient batchAsyncClient, String jobScheduleId, RequestOptions options)

Creates a new JobScheduleTerminatePollerAsync.

Method Summary

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

Activation operation to start the termination.

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

Cancel operation (not supported for terminate).

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

Final result fetch operation.

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

Poll operation to check the job schedule's termination state.

Methods inherited from java.lang.Object

Constructor Details

JobScheduleTerminatePollerAsync

public JobScheduleTerminatePollerAsync(BatchAsyncClient batchAsyncClient, String jobScheduleId, RequestOptions options)

Creates a new JobScheduleTerminatePollerAsync.

Parameters:

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

Method Details

getActivationOperation

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

Activation operation to start the termination.

Returns:

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

getCancelOperation

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

Cancel operation (not supported for terminate).

Returns:

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

getFetchResultOperation

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

Final result fetch operation.

Returns:

A function that fetches the final BatchJobSchedule after successful termination.

getPollOperation

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

Poll operation to check the job schedule's termination state.

Returns:

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

Applies to