com.bigdata.counters
Class AbstractProcessCollector

java.lang.Object
  extended by com.bigdata.counters.AbstractProcessCollector
All Implemented Interfaces:
IStatisticsCollector
Direct Known Subclasses:
PIDStatCollector, SarCpuUtilizationCollector, TypeperfCollector, VMStatCollector

public abstract class AbstractProcessCollector
extends Object
implements IStatisticsCollector

Base class for collection of performance counters as reported by a native process.

Version:
$Id: AbstractProcessCollector.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected  ActiveProcess activeProcess
           
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
AbstractProcessCollector(int interval)
           
 
Method Summary
abstract  List<String> getCommand()
           
 int getInterval()
          The interval in seconds at which the counter values are sampled.
abstract  AbstractProcessReader getProcessReader()
           
protected  void setEnvironment(Map<String,String> env)
          Override if you want to impose settings on environment variables.
 void start()
          Creates the ActiveProcess and the ActiveProcess#start(com.bigdata.counters.AbstractStatisticsCollector.AbstractProcessReader)s it passing in the value returned by the getProcessReader()
 void stop()
          Stop collecting performance data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bigdata.counters.IStatisticsCollector
getCounters
 

Field Detail

log

protected static final org.apache.log4j.Logger log

activeProcess

protected ActiveProcess activeProcess
Constructor Detail

AbstractProcessCollector

public AbstractProcessCollector(int interval)
Parameters:
interval - The interval at which the performance counters will be read in milliseconds.
Method Detail

getInterval

public int getInterval()
Description copied from interface: IStatisticsCollector
The interval in seconds at which the counter values are sampled.

Specified by:
getInterval in interface IStatisticsCollector

setEnvironment

protected void setEnvironment(Map<String,String> env)
Override if you want to impose settings on environment variables.


start

public void start()
Creates the ActiveProcess and the ActiveProcess#start(com.bigdata.counters.AbstractStatisticsCollector.AbstractProcessReader)s it passing in the value returned by the getProcessReader()

Specified by:
start in interface IStatisticsCollector

stop

public void stop()
Description copied from interface: IStatisticsCollector
Stop collecting performance data.

Specified by:
stop in interface IStatisticsCollector

getCommand

public abstract List<String> getCommand()

getProcessReader

public abstract AbstractProcessReader getProcessReader()


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.