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