org.nukesoft.bot2.botutil
Class Log.LogService
java.lang.Object
|
+--java.lang.Thread
|
+--org.nukesoft.bot2.botutil.Log.LogService
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- Log
- private static class Log.LogService
- extends Thread
Utility class that autoflushes all logs.
- Author:
- Ryan Michela
Constructor Summary |
Log.LogService(long timeBetweenFlushes)
Starts the log service thread. |
Method Summary |
void |
run()
Main log service thread loop. |
void |
setTimeBetweenFlushes(long timeBetweenFlushes)
Sets the flush interval. |
void |
shutdown()
Terminates the log service. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
timeBetweenFlushes
private long timeBetweenFlushes
keepGoing
private boolean keepGoing
pause
private boolean pause
Log.LogService
public Log.LogService(long timeBetweenFlushes)
- Starts the log service thread.
- Parameters:
timeBetweenFlushes
- The time, in seconds, between flushes.
setTimeBetweenFlushes
public void setTimeBetweenFlushes(long timeBetweenFlushes)
- Sets the flush interval.
- Parameters:
timeBetweenFlushes
- Flush interval, in seconds.
shutdown
public void shutdown()
- Terminates the log service.
run
public void run()
- Main log service thread loop.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
- See Also:
Runnable.run()