InterruptMonitor

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

ConstructorDescription
InterruptMonitorInitializes a new instance of the {@link InterruptMonitor} class.

Methods

MethodDescription
disposeDisposes used resources.
getCancellationTokenMonitor’s cancellation token used for process interruption. By default each IInterruptMonitor generates its own cancellationSource.
getThreadLocalInstanceGets or sets the IInterruptMonitor instance which is unique for each thread.
interruptSends a request to interrupt operations.
setThreadLocalInstanceGets 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.