Class InterruptibleRMIThread
java.lang.Object
java.lang.Thread
ecmwf.common.rmi.interruptible.InterruptibleRMIThread
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionInterruptibleRMIThread
(Runnable target) Instantiates a new interruptible RMI thread.InterruptibleRMIThread
(ThreadGroup group, Runnable runnable, String name, long stackSize) Instantiates a new interruptible RMI thread. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Interrupt this thread, even if it is in a blocking RMI IO operation.Methods inherited from class java.lang.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
-
InterruptibleRMIThread
Instantiates a new interruptible RMI thread.- Parameters:
target
- the target- See Also:
-
InterruptibleRMIThread
Instantiates a new interruptible RMI thread.- Parameters:
group
- the grouprunnable
- the runnablename
- the namestackSize
- the stack size- See Also:
-
-
Method Details
-
interrupt
public void interrupt()Interrupt this thread, even if it is in a blocking RMI IO operation. This method first invokes the superclass's #interrupt method. Then, if an RMI socket has been registered as being in IO for this thread, a special marker (like an EOF) is written to the socket (to help the server side shutdown its threads), and then the RMI socket is directly closed. Afterwards, this thread's interrupt status will have been set.
-