kieker.monitoring.writer
Class AbstractAsyncThread
java.lang.Object
java.lang.Thread
kieker.monitoring.writer.AbstractAsyncThread
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- AbstractFsWriterThread, AbstractZipWriterThread
public abstract class AbstractAsyncThread
- extends Thread
- Since:
- 1.3
- Author:
- Andre van Hoorn, Jan Waller
Method Summary |
void |
initShutdown(CountDownLatch cdl)
Initializes the shutdown of this thread if necessary. |
boolean |
isFinished()
Can be used to determine whether the thread is in the finished state or not. |
void |
run()
|
String |
toString()
Returns a human-readable information string about the writer's configuration and state. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
AbstractAsyncThread
public AbstractAsyncThread(IMonitoringController monitoringController,
BlockingQueue<IMonitoringRecord> writeQueue)
- Creates a new instance of this class using the given parameters.
- Parameters:
monitoringController
- The monitoring controller for the current monitoring session.writeQueue
- The queue containing the records (and the potential end of monitoring
marker).
initShutdown
public final void initShutdown(CountDownLatch cdl)
- Initializes the shutdown of this thread if necessary. The method returns immediately in every case and counts the latch down eventually (assuming that no
exception occurs).
- Parameters:
cdl
- The latch which will be count down once the thread has been terminated.
isFinished
public final boolean isFinished()
- Can be used to determine whether the thread is in the finished state or not.
- Returns:
- true iff the thread has set the finished flag.
run
public final void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
toString
public String toString()
- Returns a human-readable information string about the writer's configuration and state.
- Overrides:
toString
in class Thread
- Returns:
- the information string.
Copyright 2014 Kieker Project, http://kieker-monitoring.net>