Package com.azure.core.util.polling
Class LongRunningOperationStatus
- java.lang.Object
-
- com.azure.core.util.ExpandableStringEnum<LongRunningOperationStatus>
-
- com.azure.core.util.polling.LongRunningOperationStatus
-
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 ofSUCCESSFULLY_COMPLETED,USER_CANCELLEDorFAILED.
-
-
Field Summary
Fields Modifier and Type Field Description static LongRunningOperationStatusFAILEDRepresents that the long-running operation has failed to successfully complete, however this is still considered as complete long-running operation, meaning that thePollerFluxinstance will report that it is complete.static LongRunningOperationStatusIN_PROGRESSRepresents that the long-running operation is in progress and not yet complete.static LongRunningOperationStatusNOT_STARTEDRepresents that polling has not yet started for this long-running operation.static LongRunningOperationStatusSUCCESSFULLY_COMPLETEDRepresent that the long-running operation is completed successfully.static LongRunningOperationStatusUSER_CANCELLEDRepresents that the long-running operation is cancelled by user, however this is still considered as complete long-running operation.
-
Constructor Summary
Constructors Constructor Description LongRunningOperationStatus()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LongRunningOperationStatusfromString(String name, boolean isComplete)Creates or finds aLongRunningOperationStatusfrom its string representation.booleanisComplete()Returns a boolean to represent if the operation is in a completed state or not.-
Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, hashCode, toString, values
-
-
-
-
Field Detail
-
NOT_STARTED
public static final LongRunningOperationStatus NOT_STARTED
Represents that polling has not yet started for this long-running operation.
-
IN_PROGRESS
public static final LongRunningOperationStatus IN_PROGRESS
Represents that the long-running operation is in progress and not yet complete.
-
SUCCESSFULLY_COMPLETED
public static final LongRunningOperationStatus SUCCESSFULLY_COMPLETED
Represent that the long-running operation is completed successfully.
-
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 thePollerFluxinstance will report that it is complete.
-
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.
-
-
Method Detail
-
fromString
public static LongRunningOperationStatus fromString(String name, boolean isComplete)
Creates or finds aLongRunningOperationStatusfrom its string representation.- Parameters:
name- a name to look forisComplete- a status to indicate if the operation is complete or not.- Returns:
- the corresponding
LongRunningOperationStatus - Throws:
IllegalArgumentException- ifnamematches a pre-configuredLongRunningOperationStatusbutisCompletedoesn't match its pre-configured complete status.
-
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.
-
-