org.jppf.server.scheduler.bundle
Class BundleDataHolder

java.lang.Object
  extended by org.jppf.server.scheduler.bundle.BundleDataHolder

public class BundleDataHolder
extends Object

Each instance of this class acts as a container for the performance data related to a node.

Author:
Laurent Cohen

Constructor Summary
BundleDataHolder(int performanceCacheSize)
          Initialize this data holder with the maximum number of samples in the performance cache.
 
Method Summary
 void addSample(BundlePerformanceSample sample)
          Add the specified performance sample to the list of samples.
 double getMean()
          Get the computed mean execution time for the corresponding node.
 long getNbSamples()
          Get the current number of samples.
 int getPerformanceCacheSize()
          Get the number of samples required to compute the moving average.
 double getPreviousMean()
          Get the previously computed mean execution time for the corresponding node.
 void setMean(double mean)
          Get the computed mean execution time for the corresponding node.
 void setPerformanceCacheSize(int performanceCacheSize)
          Set the number of samples required to compute the moving average.
 String toString()
          Get a string representation of this bundler data holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BundleDataHolder

public BundleDataHolder(int performanceCacheSize)
Initialize this data holder with the maximum number of samples in the performance cache.

Parameters:
performanceCacheSize - - the number of samples as an int.
Method Detail

addSample

public void addSample(BundlePerformanceSample sample)
Add the specified performance sample to the list of samples.

Parameters:
sample - - the performance sample to add.

getMean

public double getMean()
Get the computed mean execution time for the corresponding node.

Returns:
the mean value as a double.

setMean

public void setMean(double mean)
Get the computed mean execution time for the corresponding node.

Parameters:
mean - - the mean value as a double.

getPreviousMean

public double getPreviousMean()
Get the previously computed mean execution time for the corresponding node.

Returns:
the previous mean value as a double.

getPerformanceCacheSize

public int getPerformanceCacheSize()
Get the number of samples required to compute the moving average.

Returns:
the number of samples as an int.

setPerformanceCacheSize

public void setPerformanceCacheSize(int performanceCacheSize)
Set the number of samples required to compute the moving average.

Parameters:
performanceCacheSize - - the number of samples as an int.

toString

public String toString()
Get a string representation of this bundler data holder.

Overrides:
toString in class Object
Returns:
a string representing the state of this object.
See Also:
Object.toString()

getNbSamples

public long getNbSamples()
Get the current number of samples.

Returns:
the number of samples as an int.


Copyright © 2005-2010 JPPF Team.