Cancellation
Leave feedback
On this page
Inheritance: java.lang.Object
public class Cancellation
Represents an object for requesting cancellation of an operation.
Learn more
| Constructor | Description |
|---|---|
| Cancellation() | Initializes a new instance of the |
| Cancellation | |
| class. | |
| Method | Description |
|---|---|
| isCancelled() | Gets a value indicating that cancellation has been requested. |
| cancel() | Makes a request for cancellation. |
| cancelAfter(int milliseconds) | Makes a request for cancellation after the expiration of specified number of milliseconds. |
public Cancellation()
Initializes a new instance of the Cancellation class.
public final boolean isCancelled()
Gets a value indicating that cancellation has been requested.
Returns: boolean - A value indicating that cancellation has been requested.
public final void cancel()
Makes a request for cancellation.
public final void cancelAfter(int milliseconds)
Makes a request for cancellation after the expiration of specified number of milliseconds.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| milliseconds | int | The number of milliseconds after which an operation will be cancelled. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.