Share via


NodeDeallocatePollerAsync Class

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

public final class NodeDeallocatePollerAsync

Async poller class used by beginDeallocateNode to implement polling logic for deallocating a BatchNode. Returns BatchNode values during polling and the final BatchNode upon successful completion.

If the node is no longer found (e.g., due to pool deletion), the operation is treated as successfully completed.

Constructor Summary

Constructor Description
NodeDeallocatePollerAsync(BatchAsyncClient batchAsyncClient, String poolId, String nodeId, RequestOptions options)

Creates a new NodeDeallocatePollerAsync.

Method Summary

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

Activation operation to start the deallocate process.

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

Cancel operation (not supported for deallocate).

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

Final result fetch operation.

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

Poll operation to check the node's state.

Methods inherited from java.lang.Object

Constructor Details

NodeDeallocatePollerAsync

public NodeDeallocatePollerAsync(BatchAsyncClient batchAsyncClient, String poolId, String nodeId, RequestOptions options)

Creates a new NodeDeallocatePollerAsync.

Parameters:

batchAsyncClient - The BatchAsyncClient used to interact with the Batch service.
poolId - The ID of the pool that contains the node.
nodeId - The ID of the node to deallocate.
options - Optional request options for service calls.

Method Details

getActivationOperation

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

Activation operation to start the deallocate process.

Returns:

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

getCancelOperation

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

Cancel operation (not supported for deallocate).

Returns:

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

getFetchResultOperation

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

Final result fetch operation.

Returns:

A function that returns the final BatchNode result from the latest poll response.

getPollOperation

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

Poll operation to check the node's state.

Returns:

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

Applies to