Class Status
java.lang.Object
io.opencensus.trace.Status
Defines the status of a
Span by providing a standard Status.CanonicalCode in conjunction
with an optional descriptive message. Instances of Status are created by starting with
the template for the appropriate Status.CanonicalCode and supplementing it with
additional information: Status.NOT_FOUND.withDescription("Could not find
'important_file.txt'");- Since:
- 0.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe set of canonical status codes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StatusThe operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.static final StatusSome entity that we attempted to create (e.g., file or directory) already exists.static final StatusThe operation was cancelled (typically by the caller).private final Status.CanonicalCodestatic final StatusUnrecoverable data loss or corruption.static final StatusDeadline expired before operation could complete.private final Stringstatic final StatusOperation was rejected because the system is not in a state required for the operation's execution.static final StatusInternal errors.static final StatusClient specified an invalid argument.static final StatusSome requested entity (e.g., file or directory) was not found.static final StatusThe operation completed successfully.static final StatusOperation was attempted past the valid range.static final StatusThe caller does not have permission to execute the specified operation.static final StatusSome resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.static final StatusThe request does not have valid authentication credentials for the operation.static final StatusThe service is currently unavailable.static final StatusOperation is not implemented or not supported/enabled in this service.static final StatusUnknown error. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateStatus(Status.CanonicalCode canonicalCode, String description) -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquality on Statuses is not well defined.Returns the canonical status code.Returns the description of thisStatusfor human consumption.inthashCode()Hash codes on Statuses are not well defined.booleanisOk()Returnstrueif thisStatusis OK, i.e., not an error.toString()withDescription(String description) Creates a derived instance ofStatuswith the given description.
-
Field Details
-
STATUS_LIST
-
OK
-
CANCELLED
The operation was cancelled (typically by the caller).- Since:
- 0.5
-
UNKNOWN
-
INVALID_ARGUMENT
Client specified an invalid argument. SeeStatus.CanonicalCode.INVALID_ARGUMENT.- Since:
- 0.5
-
DEADLINE_EXCEEDED
Deadline expired before operation could complete. SeeStatus.CanonicalCode.DEADLINE_EXCEEDED.- Since:
- 0.5
-
NOT_FOUND
Some requested entity (e.g., file or directory) was not found.- Since:
- 0.5
-
ALREADY_EXISTS
Some entity that we attempted to create (e.g., file or directory) already exists.- Since:
- 0.5
-
PERMISSION_DENIED
The caller does not have permission to execute the specified operation. SeeStatus.CanonicalCode.PERMISSION_DENIED.- Since:
- 0.5
-
UNAUTHENTICATED
The request does not have valid authentication credentials for the operation.- Since:
- 0.5
-
RESOURCE_EXHAUSTED
Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.- Since:
- 0.5
-
FAILED_PRECONDITION
Operation was rejected because the system is not in a state required for the operation's execution. SeeStatus.CanonicalCode.FAILED_PRECONDITION.- Since:
- 0.5
-
ABORTED
The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc. SeeStatus.CanonicalCode.ABORTED.- Since:
- 0.5
-
OUT_OF_RANGE
Operation was attempted past the valid range. SeeStatus.CanonicalCode.OUT_OF_RANGE.- Since:
- 0.5
-
UNIMPLEMENTED
Operation is not implemented or not supported/enabled in this service.- Since:
- 0.5
-
INTERNAL
-
UNAVAILABLE
The service is currently unavailable. SeeStatus.CanonicalCode.UNAVAILABLE.- Since:
- 0.5
-
DATA_LOSS
-
canonicalCode
-
description
-
-
Constructor Details
-
Status
-
-
Method Details
-
buildStatusList
-
withDescription
-
getCanonicalCode
Returns the canonical status code.- Returns:
- the canonical status code.
- Since:
- 0.5
-
getDescription
-
isOk
public boolean isOk()Returnstrueif thisStatusis OK, i.e., not an error.- Returns:
trueif thisStatusis OK.- Since:
- 0.5
-
equals
Equality on Statuses is not well defined. Instead, do comparison based on their CanonicalCode withgetCanonicalCode(). The description of the Status is unlikely to be stable, and additional fields may be added to Status in the future. -
hashCode
-
toString
-