public class InterruptMonitor extends Object
Represents information about interruption.
Constructor and Description |
---|
InterruptMonitor()
Initializes a new instance of the
InterruptMonitor class. |
Modifier and Type | Method and Description |
---|---|
static InterruptMonitor |
getThreadLocalInstance()
Gets or sets the InterruptMonitor instance which is unique for each thread.
|
void |
interrupt()
Sends a request to interrupt operations.
|
boolean |
isInterrupted()
Gets the value indicating whether operations should be interrupted.
|
static boolean |
isThreadInterrupted()
Returns
true if interrupt monitor for current thread exists and it was interrupted otherwise false . |
static void |
setThreadLocalInstance(InterruptMonitor value)
Gets or sets the InterruptMonitor instance which is unique for each thread.
|
public InterruptMonitor()
Initializes a new instance of the InterruptMonitor
class.
public static InterruptMonitor getThreadLocalInstance()
Gets or sets the InterruptMonitor instance which is unique for each thread.
public static void setThreadLocalInstance(InterruptMonitor value)
Gets or sets the InterruptMonitor instance which is unique for each thread.
public static boolean isThreadInterrupted()
Returns true
if interrupt monitor for current thread exists and it was interrupted otherwise false
.
true
if interrupt monitor for current thread exists and it was interrupted otherwise false
.public boolean isInterrupted()
Gets the value indicating whether operations should be interrupted.
public void interrupt()
Sends a request to interrupt operations.
Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.