public final class TaskDurationLogger extends Object implements org.jdtaus.core.monitor.TaskListener
TaskListener
logging the duration of an operation performed by
a Task
.onTaskEvent(TaskEvent)
Constructor and Description |
---|
TaskDurationLogger()
Creates a new
TaskDurationLogger instance. |
TaskDurationLogger(long loggingThresholdMillis)
Creates a new
TaskDurationLogger instance taking the number of
milliseconds a task at least needs to run to trigger a message when
finished. |
Modifier and Type | Method and Description |
---|---|
long |
getLoggingThresholdMillis()
Gets the number of milliseconds a task at least needs to run to trigger
a message when finished.
|
void |
onTaskEvent(org.jdtaus.core.monitor.TaskEvent event)
This method measures the time a task is running and logs
information for tasks running longer than specified by configuration
property
loggingThresholdMillis (defaults to 60000). |
public TaskDurationLogger()
TaskDurationLogger
instance.public TaskDurationLogger(long loggingThresholdMillis)
TaskDurationLogger
instance taking the number of
milliseconds a task at least needs to run to trigger a message when
finished.loggingThresholdMillis
- the number of milliseconds a task at least
needs to run to trigger a message when finished.public void onTaskEvent(org.jdtaus.core.monitor.TaskEvent event)
This method measures the time a task is running and logs
information for tasks running longer than specified by configuration
property loggingThresholdMillis
(defaults to 60000).
onTaskEvent
in interface org.jdtaus.core.monitor.TaskListener
event
- the event send by a Task
.public long getLoggingThresholdMillis()
Copyright © 2005-2012 jDTAUS. All Rights Reserved.