rabbit.nio
Class StatisticsCollector

java.lang.Object
  extended by rabbit.nio.StatisticsCollector
All Implemented Interfaces:
Runnable

public class StatisticsCollector
extends Object
implements Runnable

A class that executes one task and gathers information about the time spent and the success status of the task.

Author:
Robert Olofsson

Constructor Summary
StatisticsCollector(StatisticsHolder stats, Runnable realTask, TaskIdentifier ti)
          Create a new StatisticsCollector that will update the given StatisticsHolder about the specific job.
 
Method Summary
 void run()
          Run the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsCollector

public StatisticsCollector(StatisticsHolder stats,
                           Runnable realTask,
                           TaskIdentifier ti)
Create a new StatisticsCollector that will update the given StatisticsHolder about the specific job.

Parameters:
stats - the StatisticsHolder to update
realTask - the task to run
ti - the identifier of the task
Method Detail

run

public void run()
Run the task.

Specified by:
run in interface Runnable