InterruptMonitor
Contents
[
Hide
]Inheritance: java.lang.Object, com.aspose.pdf.multithreading.InterruptMonitor
All Implemented Interfaces: com.aspose.ms.System.IDisposable, IInterruptMonitor
public class InterruptMonitor extends Object implements IInterruptMonitor
Represents information about interruption.
Constructors
| Constructor | Description |
|---|---|
| InterruptMonitor | Initializes a new instance of the {@link InterruptMonitor} class. |
Methods
| Method | Description |
|---|---|
| dispose | Disposes used resources. |
| getCancellationToken | Monitor’s cancellation token used for process interruption. By default each IInterruptMonitor generates its own cancellationSource. |
| getThreadLocalInstance | Gets or sets the IInterruptMonitor instance which is unique for each thread. |
| interrupt | Sends a request to interrupt operations. |
| setThreadLocalInstance | Gets or sets the IInterruptMonitor instance which is unique for each thread. |
InterruptMonitor
public InterruptMonitor()
Initializes a new instance of the {@link InterruptMonitor} class.
dispose
public final void dispose()
Disposes used resources.
getCancellationToken
public final CancellationTokenSource getCancellationToken()
Monitor’s cancellation token used for process interruption. By default each IInterruptMonitor generates its own cancellationSource.
Returns: CancellationTokenSource instance
getThreadLocalInstance
public static IInterruptMonitor getThreadLocalInstance()
Gets or sets the IInterruptMonitor instance which is unique for each thread.
Returns: IInterruptMonitor instance
interrupt
public void interrupt()
Sends a request to interrupt operations.
setThreadLocalInstance
Gets or sets the IInterruptMonitor instance which is unique for each thread.