LongRunningOperationStatus Class

public final class LongRunningOperationStatus
extends ExpandableStringEnum<LongRunningOperationStatus>

An enum to represent all possible states that a long-running operation may find itself in. The poll operation is considered complete when the status is one of SUCCESSFULLY_COMPLETED, USER_CANCELLED or FAILED.

Field Summary

Modifier and Type Field and Description
static final LongRunningOperationStatus FAILED

Represents that the long-running operation has failed to successfully complete, however this is still considered as complete long-running operation, meaning that the PollerFlux<T,U> instance will report that it is complete.

static final LongRunningOperationStatus IN_PROGRESS

Represents that the long-running operation is in progress and not yet complete.

static final LongRunningOperationStatus NOT_STARTED

Represents that polling has not yet started for this long-running operation.

static final LongRunningOperationStatus SUCCESSFULLY_COMPLETED

Represent that the long-running operation is completed successfully.

static final LongRunningOperationStatus USER_CANCELLED

Represents that the long-running operation is cancelled by user, however this is still considered as complete long-running operation.

Constructor Summary

Constructor Description
LongRunningOperationStatus()

Deprecated

Use one of the constants or the fromString(String name, boolean isComplete) factory method.

Creates a new instance of LongRunningOperationStatus without a #toString() value.

Method Summary

Modifier and Type Method and Description
static LongRunningOperationStatus fromString(String name, boolean isComplete)

Creates or finds a LongRunningOperationStatus from its string representation.

boolean isComplete()

Returns a boolean to represent if the operation is in a completed state or not.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

FAILED

public static final LongRunningOperationStatus FAILED

Represents that the long-running operation has failed to successfully complete, however this is still considered as complete long-running operation, meaning that the PollerFlux<T,U> instance will report that it is complete.

IN_PROGRESS

public static final LongRunningOperationStatus IN_PROGRESS

Represents that the long-running operation is in progress and not yet complete.

NOT_STARTED

public static final LongRunningOperationStatus NOT_STARTED

Represents that polling has not yet started for this long-running operation.

SUCCESSFULLY_COMPLETED

public static final LongRunningOperationStatus SUCCESSFULLY_COMPLETED

Represent that the long-running operation is completed successfully.

USER_CANCELLED

public static final LongRunningOperationStatus USER_CANCELLED

Represents that the long-running operation is cancelled by user, however this is still considered as complete long-running operation.

Constructor Details

LongRunningOperationStatus

@Deprecated
public LongRunningOperationStatus()

Deprecated

Use one of the constants or the fromString(String name, boolean isComplete) factory method.

Creates a new instance of LongRunningOperationStatus without a #toString() value.

This constructor shouldn't be called as it will produce a LongRunningOperationStatus which doesn't have a String enum value.

Method Details

fromString

public static LongRunningOperationStatus fromString(String name, boolean isComplete)

Creates or finds a LongRunningOperationStatus from its string representation.

Parameters:

name - a name to look for
isComplete - a status to indicate if the operation is complete or not.

Returns:

the corresponding LongRunningOperationStatus

isComplete

public boolean isComplete()

Returns a boolean to represent if the operation is in a completed state or not.

Returns:

True if the operation is in a completed state, otherwise false.

Applies to