Class MyThread
- java.lang.Object
- 
- java.lang.Thread
- 
- edu.uiuc.ncsa.security.core.cache.MyThread
 
 
- 
- All Implemented Interfaces:
- Runnable
 - Direct Known Subclasses:
- Cleanup,- LastAccessedThread
 
 public class MyThread extends Thread Top-level thread class for anything that needs to run in OA4MP. Has barebones logging, getting alarms and sleep intervals plus stopThread method to shut it down cleanly.Created by Jeff Gaynor 
 on 3/29/23 at 1:10 PM
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
 
- 
 - 
Field SummaryFields Modifier and Type Field Description longcleanupInterval- 
Fields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
- 
 - 
Constructor SummaryConstructors Constructor Description MyThread(String name, MyLoggingFacade logger)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddebug(String x)protected voiddebug(String x, Throwable t)Collection<LocalTime>getAlarms()longgetCleanupInterval()The amount of time, in milliseconds, to wait between attempts to age the cache.protected longgetNextSleepInterval()protected voidinfo(String x)booleanisStopThread()Is this thread set to stop?booleanisTestMode()voidsetAlarms(Collection<LocalTime> alarms)voidsetCleanupInterval(long cleanupInterval)voidsetStopThread(boolean stopThread)Sets the flag to stop this thread.voidsetTestMode(boolean testMode)protected voidwarn(String x)- 
Methods inherited from class java.lang.ThreadactiveCount, 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
 
- 
 
- 
- 
- 
Constructor Detail- 
MyThreadpublic MyThread(String name, MyLoggingFacade logger) 
 
- 
 - 
Method Detail- 
isTestModepublic boolean isTestMode() 
 - 
setTestModepublic void setTestMode(boolean testMode) 
 - 
getCleanupIntervalpublic long getCleanupInterval() The amount of time, in milliseconds, to wait between attempts to age the cache.- Returns:
 
 - 
setCleanupIntervalpublic void setCleanupInterval(long cleanupInterval) 
 - 
getAlarmspublic Collection<LocalTime> getAlarms() 
 - 
setAlarmspublic void setAlarms(Collection<LocalTime> alarms) 
 - 
isStopThreadpublic boolean isStopThread() Is this thread set to stop?- Returns:
 
 - 
setStopThreadpublic void setStopThread(boolean stopThread) Sets the flag to stop this thread. The next time the thread wakes up after this is enabled, the thread will exit. This allows for a clean shutdown of caching.- Parameters:
- stopThread-
 
 - 
infoprotected void info(String x) 
 - 
warnprotected void warn(String x) 
 - 
debugprotected void debug(String x) 
 - 
getNextSleepIntervalprotected long getNextSleepInterval() 
 
- 
 
-