xsmeral.pipe.stats
Class StatsWriter

java.lang.Object
  extended by xsmeral.pipe.PipeAttachedProcessor
      extended by xsmeral.pipe.stats.StatsWriter
All Implemented Interfaces:
Runnable, AttachedProcessor

public class StatsWriter
extends PipeAttachedProcessor

Writes pipe context parameters to a file (or standard/error output) periodically.


Initialization parameters
file - Name of file for writing stats, or "stderr"/"stdout" to write to standard/error output
interval - (Optional) Interval, in seconds, of writing. Value of 0 means the stats are written only once, when the pipe stops
filter - (Optional) Comma-separated list of prefixes of context parameter names, e.g. "stats.p1,stats.p2", that will be written to output. Empty string means no filtering.

Field Summary
 
Fields inherited from class xsmeral.pipe.PipeAttachedProcessor
error
 
Constructor Summary
StatsWriter()
           
 
Method Summary
 void chainStopped()
          Called after all object processors in chain stopped running.
 void postContext()
          Called after context has been assigned to all processors.
 void run()
          Starts the processor.
 
Methods inherited from class xsmeral.pipe.PipeAttachedProcessor
canStart, detach, getParams, getPipe, initialize, preContext, setParams, setPipe, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsWriter

public StatsWriter()
Method Detail

postContext

public void postContext()
Description copied from interface: AttachedProcessor
Called after context has been assigned to all processors.

Specified by:
postContext in interface AttachedProcessor
Overrides:
postContext in class PipeAttachedProcessor

chainStopped

public void chainStopped()
Description copied from interface: AttachedProcessor
Called after all object processors in chain stopped running.

Specified by:
chainStopped in interface AttachedProcessor
Overrides:
chainStopped in class PipeAttachedProcessor

run

public void run()
Description copied from class: PipeAttachedProcessor
Starts the processor.

Specified by:
run in interface Runnable
Overrides:
run in class PipeAttachedProcessor