Share via


NodeRemovePollerAsync Class

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

public final class NodeRemovePollerAsync

Async poller used by beginRemoveNodes to drive the *remove nodes* long-running operation.

The poller completes when the pool’s AllocationState returns to steady. A 404 (pool deleted) is also treated as successful completion, returning null as the final result.

Constructor Summary

Constructor Description
NodeRemovePollerAsync(BatchAsyncClient client, String poolId, BatchNodeRemoveParameters parameters, RequestOptions options)

Creates a new NodeRemovePollerAsync.

Method Summary

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

Activation operation that sends the initial remove-nodes request.

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

Cancel operation (not supported for remove-nodes).

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

NodeRemovePollerAsync

public NodeRemovePollerAsync(BatchAsyncClient client, String poolId, BatchNodeRemoveParameters parameters, RequestOptions options)

Creates a new NodeRemovePollerAsync.

Parameters:

client - Batch async client.
poolId - ID of the pool from which nodes are being removed.
parameters - Body parameters (list of node IDs, deallocation option, \u2026).
options - Optional request options (may be null).

Method Details

getActivationOperation

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

Activation operation that sends the initial remove-nodes request.

Returns:

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

getCancelOperation

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

Cancel operation (not supported for remove-nodes).

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 returns 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