Package com.arcadedb.utility
Class SoftThread
- java.lang.Object
-
- java.lang.Thread
-
- com.arcadedb.utility.SoftThread
-
-
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
Constructors Constructor Description SoftThread(String name)
SoftThread(ThreadGroup iThreadGroup)
SoftThread(ThreadGroup group, String name)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
afterExecution()
protected void
beforeExecution()
protected abstract void
execute()
boolean
isDumpExceptions()
boolean
isShutdownFlag()
static boolean
pauseCurrentThread(long iTime)
Pauses current thread until iTime timeout or a wake up by another thread.void
run()
void
sendShutdown()
void
setDumpExceptions(boolean dumpExceptions)
void
shutdown()
void
softShutdown()
void
startup()
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
SoftThread
public SoftThread(ThreadGroup iThreadGroup)
-
SoftThread
public SoftThread(String name)
-
SoftThread
public SoftThread(ThreadGroup group, String name)
-
-
Method Detail
-
startup
public void startup()
-
shutdown
public void shutdown()
-
sendShutdown
public void sendShutdown()
-
softShutdown
public void softShutdown()
-
isShutdownFlag
public boolean isShutdownFlag()
-
pauseCurrentThread
public static boolean pauseCurrentThread(long iTime)
Pauses current thread until iTime timeout or a wake up by another thread.- Returns:
- true if timeout has reached, otherwise false. False is the case of wake-up by another thread.
-
isDumpExceptions
public boolean isDumpExceptions()
-
setDumpExceptions
public void setDumpExceptions(boolean dumpExceptions)
-
beforeExecution
protected void beforeExecution()
-
afterExecution
protected void afterExecution()
-
-