GigaSpaces XAP 9.5 API

com.sun.jini.thread
Class InterruptedStatusThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.gigaspaces.internal.utils.concurrent.GSThread
          extended by com.sun.jini.thread.InterruptedStatusThread
All Implemented Interfaces:
Runnable

public class InterruptedStatusThread
extends com.gigaspaces.internal.utils.concurrent.GSThread

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 java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InterruptedStatusThread(Runnable target, String name)
          Constructs a new InterruptedStatusThread object.
InterruptedStatusThread(String name)
          Constructs a new InterruptedStatusThread object.
InterruptedStatusThread(ThreadGroup group, Runnable target, String name, long stackSize)
          Constructs a new InterruptedStatusThread object.
 
Method Summary
 boolean hasBeenInterrupted()
          Method used to determine if interrupt has been called on this thread.
 void interrupt()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterruptedStatusThread

public InterruptedStatusThread(Runnable target,
                               String name)
Constructs a new InterruptedStatusThread object.

Parameters:
target - the object whose run method is called
name - the name of the new thread

InterruptedStatusThread

public InterruptedStatusThread(String name)
Constructs a new InterruptedStatusThread object.

Parameters:
name - the name of the new thread

InterruptedStatusThread

public InterruptedStatusThread(ThreadGroup group,
                               Runnable target,
                               String name,
                               long stackSize)
Constructs a new InterruptedStatusThread object.

Parameters:
group - the thread group
target - the object whose run method is called
name - the name of the new thread
stackSize - the desired stack size for the new thread, or zero to indicate that this parameter is to be ignored
Method Detail

interrupt

public void interrupt()
Overrides:
interrupt in class Thread

hasBeenInterrupted

public boolean hasBeenInterrupted()
Method used to determine if interrupt has been called on this thread.

Returns:
returns true if interrupt has been called on this thread, false otherwise.

GigaSpaces XAP 9.5 API

Copyright © GigaSpaces.