org.apache.activemq.tool.sampler
Class AbstractPerformanceSampler

java.lang.Object
  extended by org.apache.activemq.tool.properties.AbstractObjectProperties
      extended by org.apache.activemq.tool.sampler.AbstractPerformanceSampler
All Implemented Interfaces:
Runnable, ReflectionConfigurable, PerformanceSampler
Direct Known Subclasses:
CpuSamplerTask, ThroughputSamplerTask

public abstract class AbstractPerformanceSampler
extends AbstractObjectProperties
implements PerformanceSampler


Field Summary
protected  long duration
           
protected  long interval
           
protected  AtomicBoolean isRunning
           
protected  org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener
           
protected  PerformanceReportWriter perfReportWriter
           
protected  long rampDownTime
           
protected  long rampUpTime
           
protected  long sampleIndex
           
 
Constructor Summary
AbstractPerformanceSampler()
           
 
Method Summary
 long getDuration()
           
 long getInterval()
           
 org.apache.activemq.tool.sampler.PerformanceEventListener getPerfEventListener()
           
 PerformanceReportWriter getPerfReportWriter()
           
 long getRampDownTime()
           
 long getRampUpTime()
           
 boolean isRunning()
           
protected  void onRampDownEnd()
           
protected  void onRampUpStart()
           
protected  void onSamplerEnd()
           
protected  void onSamplerStart()
           
 void run()
           
protected  void sample()
           
abstract  void sampleData()
           
 void setDuration(long duration)
           
 void setInterval(long interval)
           
 void setPerfEventListener(org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener)
           
 void setPerfReportWriter(PerformanceReportWriter perfReportWriter)
           
 void setRampDownTime(long rampDownTime)
           
 void setRampUpTime(long rampUpTime)
           
 void startSampler()
           
 void waitUntilDone()
           
 
Methods inherited from class org.apache.activemq.tool.properties.AbstractObjectProperties
acceptConfig, configureProperties, retrieveProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rampUpTime

protected long rampUpTime

rampDownTime

protected long rampDownTime

duration

protected long duration

interval

protected long interval

perfReportWriter

protected PerformanceReportWriter perfReportWriter

perfEventListener

protected org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener

isRunning

protected final AtomicBoolean isRunning

sampleIndex

protected long sampleIndex
Constructor Detail

AbstractPerformanceSampler

public AbstractPerformanceSampler()
Method Detail

getRampUpTime

public long getRampUpTime()
Specified by:
getRampUpTime in interface PerformanceSampler

setRampUpTime

public void setRampUpTime(long rampUpTime)
Specified by:
setRampUpTime in interface PerformanceSampler

getRampDownTime

public long getRampDownTime()
Specified by:
getRampDownTime in interface PerformanceSampler

setRampDownTime

public void setRampDownTime(long rampDownTime)
Specified by:
setRampDownTime in interface PerformanceSampler

getDuration

public long getDuration()
Specified by:
getDuration in interface PerformanceSampler

setDuration

public void setDuration(long duration)
Specified by:
setDuration in interface PerformanceSampler

getInterval

public long getInterval()
Specified by:
getInterval in interface PerformanceSampler

setInterval

public void setInterval(long interval)
Specified by:
setInterval in interface PerformanceSampler

getPerfReportWriter

public PerformanceReportWriter getPerfReportWriter()
Specified by:
getPerfReportWriter in interface PerformanceSampler

setPerfReportWriter

public void setPerfReportWriter(PerformanceReportWriter perfReportWriter)
Specified by:
setPerfReportWriter in interface PerformanceSampler

getPerfEventListener

public org.apache.activemq.tool.sampler.PerformanceEventListener getPerfEventListener()
Specified by:
getPerfEventListener in interface PerformanceSampler

setPerfEventListener

public void setPerfEventListener(org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener)
Specified by:
setPerfEventListener in interface PerformanceSampler

startSampler

public void startSampler()

run

public void run()
Specified by:
run in interface Runnable

sample

protected void sample()

sampleData

public abstract void sampleData()
Specified by:
sampleData in interface PerformanceSampler

isRunning

public boolean isRunning()
Specified by:
isRunning in interface PerformanceSampler

waitUntilDone

public void waitUntilDone()
Specified by:
waitUntilDone in interface PerformanceSampler

onRampUpStart

protected void onRampUpStart()

onSamplerStart

protected void onSamplerStart()

onSamplerEnd

protected void onSamplerEnd()

onRampDownEnd

protected void onRampDownEnd()


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.