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