Share via


PoolStopResizePollerAsync Class

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

public final class PoolStopResizePollerAsync

Async poller class used by beginStopPoolResize to implement polling logic for halting a pool resize. It emits BatchPool snapshots while polling and returns the final BatchPool on successful completion.

Completion criteria

  • The pool’s AllocationState becomes STEADY; or
  • The pool is no longer found (HTTP 404) — treated as success with a null final result.

Constructor Summary

Constructor Description
PoolStopResizePollerAsync(BatchAsyncClient batchAsyncClient, String poolId, RequestOptions options)

Creates a new PoolStopResizePollerAsync.

Method Summary

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

Activation operation that sends the initial stop-resize request.

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

Cancellation operation — not supported for stop-resize.

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

Final result fetch operation.

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

Poll operation to check the pool's state.

Methods inherited from java.lang.Object

Constructor Details

PoolStopResizePollerAsync

public PoolStopResizePollerAsync(BatchAsyncClient batchAsyncClient, String poolId, RequestOptions options)

Creates a new PoolStopResizePollerAsync.

Parameters:

batchAsyncClient - Client used for Batch service calls.
poolId - ID of the pool whose resize is being stopped.
options - Optional RequestOptions; may be null.

Method Details

getActivationOperation

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

Activation operation that sends the initial stop-resize request.

Returns:

A function that initiates the operation and supplies a PollResponse<T> whose status is LongRunningOperationStatus#IN_PROGRESS.

getCancelOperation

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

Cancellation operation — not supported for stop-resize.

Returns:

A function that always returns Mono#empty(), indicating cancellation is unsupported.

getFetchResultOperation

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

Final result fetch operation.

Returns:

A function that retrieves the final BatchPool stored in the latest poll response, or Mono#empty() if the pool no longer exists.

getPollOperation

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

Poll operation to check the pool's state.

Returns:

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

Applies to