public class Cancellation
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getReason()
If cancellation has been requested (i.e.
|
boolean |
isCancelled()
Returns
true if cancellation has been requested, false
otherwise. |
public boolean isCancelled()
true
if cancellation has been requested, false
otherwise.public java.util.Optional<java.lang.String> getReason()
isCancelled()
is
true
), returns the reason of the cancellation as provided by the
user. Otherwise, an empty Optional
is returned.Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.