|
Kieker 1.11 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread kieker.monitoring.writer.AbstractAsyncThread
public abstract class AbstractAsyncThread
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected IMonitoringController |
monitoringController
The monitoring controller for the current monitoring session. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AbstractAsyncThread(IMonitoringController monitoringController,
java.util.concurrent.BlockingQueue<IMonitoringRecord> writeQueue)
Creates a new instance of this class using the given parameters. |
Method Summary | |
---|---|
protected abstract void |
cleanup()
Inheriting classes should implement this method to do some cleanup work like, for example, closing open connections. |
protected abstract void |
consume(IMonitoringRecord monitoringRecord)
Inheriting classes should implement this method to consume the given record by, for example, sending it to a JMS client or by writing it to the file sysytem. |
void |
initShutdown(java.util.concurrent.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()
|
java.lang.String |
toString()
Returns a human-readable information string about the writer's configuration and state. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, 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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final IMonitoringController monitoringController
Constructor Detail |
---|
public AbstractAsyncThread(IMonitoringController monitoringController, java.util.concurrent.BlockingQueue<IMonitoringRecord> writeQueue)
monitoringController
- The monitoring controller for the current monitoring session.writeQueue
- The queue containing the records (and the potential end of monitoring
marker).Method Detail |
---|
public final void initShutdown(java.util.concurrent.CountDownLatch cdl)
cdl
- The latch which will be count down once the thread has been terminated.public final boolean isFinished()
public final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String toString()
toString
in class java.lang.Thread
protected abstract void consume(IMonitoringRecord monitoringRecord) throws java.lang.Exception
monitoringRecord
- The record to consume.
java.lang.Exception
- Indicates that something went wrong during the consumption.protected abstract void cleanup()
|
Kieker 1.11 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |