com.atlassian.bitbucket.util.CancelState |
Tracks the cancelation state of a cancelable operation.
Once an operation has been canceled
, it cannot be "un-canceled". Where multiple
observers have the option to cancel an operation, cancellation by any observer should be considered as
final and binding; implementations should not require consensus among all observers.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Cancels the operation, providing a message explaining why.
| |||||||||||
Retrieves a flag indicating whether the operation has been canceled.
|
Cancels the operation, providing a message explaining why.
The cancellation message is required, and should be as descriptive and clear as possible to allow end users to correct, if possible, the issue that triggered cancellation.
message | a descriptive message explaining why the operation has been canceled |
---|
NullPointerException | if the provided message is null
|
---|
Retrieves a flag indicating whether the operation has been canceled.
In situations where multiple observers have the option to cancel an operation, for example when multiple
listeners receive the same CancelableEvent
, this flag
can be useful for determining that another observer has already canceled the operation.
true
if the operation has been canceled
; otherwise, false