CancellationTokenSource Class
- java.
lang. Object - system.
fabric. CancellationTokenSource
- system.
public class CancellationTokenSource
A CancellationTokenSource is used to create CancellationToken object and manage it.
Constructor Summary
Constructor | Description |
---|---|
CancellationTokenSource() |
Initializes a new instance of the system.fabric.CancellationTokenSource class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Requests cancel on the CancellationToken being managed by this object. |
Cancellation |
getToken()
Returns the cancellation token which is being by this system.fabric.CancellationTokenSource object. |
boolean |
isCancellationRequested()
Gets whether cancellation has been requested for this system.fabric.CancellationTokenSource. |
Constructor Details
CancellationTokenSource
public CancellationTokenSource()
Initializes a new instance of the system.fabric.CancellationTokenSource class.
Method Details
cancel
public void cancel()
Requests cancel on the CancellationToken being managed by this object.
getToken
public CancellationToken getToken()
Returns the cancellation token which is being by this system.fabric.CancellationTokenSource object.
Returns:
isCancellationRequested
public boolean isCancellationRequested()
Gets whether cancellation has been requested for this system.fabric.CancellationTokenSource.
Returns:
Applies to
Azure SDK for Java
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente las Cuestiones de GitHub como mecanismo de retroalimentación para el contenido y lo sustituiremos por un nuevo sistema de retroalimentación. Para más información, consulta:Enviar y ver comentarios de