Class InterruptedStatusThread
java.lang.Object
java.lang.Thread
com.gigaspaces.internal.utils.concurrent.GSThread
com.sun.jini.thread.InterruptedStatusThread
- All Implemented Interfaces:
Runnable
Common Thread subclass to handle potential loss of interrupted status.
- Since:
- 2.1
- Author:
- Sun Microsystems, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionInterruptedStatusThread(Runnable target, String name) Constructs a newInterruptedStatusThreadobject.Constructs a newInterruptedStatusThreadobject.InterruptedStatusThread(ThreadGroup group, Runnable target, String name, long stackSize) Constructs a newInterruptedStatusThreadobject. -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethod used to determine ifinterrupthas been called on this thread.voidMethods inherited from class Thread
activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, toString, yield
-
Constructor Details
-
InterruptedStatusThread
-
InterruptedStatusThread
Constructs a newInterruptedStatusThreadobject.- Parameters:
name- the name of the new thread
-
InterruptedStatusThread
Constructs a newInterruptedStatusThreadobject.- Parameters:
group- the thread grouptarget- the object whoserunmethod is calledname- the name of the new threadstackSize- the desired stack size for the new thread, or zero to indicate that this parameter is to be ignored
-
-
Method Details
-
interrupt
-
hasBeenInterrupted
public boolean hasBeenInterrupted()Method used to determine ifinterrupthas been called on this thread.- Returns:
- returns true if
interrupthas been called on this thread, false otherwise.
-