org.jppf.server.scheduler.bundle
Class AbstractBundler

java.lang.Object
  extended by org.jppf.server.scheduler.bundle.AbstractBundler
All Implemented Interfaces:
Bundler
Direct Known Subclasses:
AbstractAutoTunedBundler, AbstractProportionalBundler, AbstractRLBundler, AutotunedDelegatingBundler, FixedSizeBundler

public abstract class AbstractBundler
extends Object
implements Bundler

Abstract implementation of the bundler interface.

Author:
Laurent Cohen

Field Summary
protected  int bundlerNumber
          The bundler number for this bundler.
protected  LoadBalancingProfile profile
          Parameters of the algorithm, grouped as a performance analysis profile.
protected  long timestamp
          The creation timestamp for this bundler.
 
Constructor Summary
AbstractBundler(LoadBalancingProfile profile)
          Creates a new instance with the specified parameters profile.
 
Method Summary
 void dispose()
          Release the resources used by this bundler.
 void feedback(int bundleSize, double totalTime)
          This method does nothing and should be overriden in subclasses.
 int getBundlerNumber()
          Get the bundler number for this bundler.
 LoadBalancingProfile getProfile()
          Get the parameters of the algorithm, grouped as a performance analysis profile.
 long getTimestamp()
          Get the timestamp at which this bundler was created.
protected abstract  int maxSize()
          Get the max bundle size that can be used for this bundler.
 void setup()
          Perform context-independant initializations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jppf.server.scheduler.bundle.Bundler
copy, getBundleSize
 

Field Detail

bundlerNumber

protected int bundlerNumber
The bundler number for this bundler.


timestamp

protected long timestamp
The creation timestamp for this bundler.


profile

protected LoadBalancingProfile profile
Parameters of the algorithm, grouped as a performance analysis profile.

Constructor Detail

AbstractBundler

public AbstractBundler(LoadBalancingProfile profile)
Creates a new instance with the specified parameters profile.

Parameters:
profile - the parameters of the load-balancing algorithm,
Method Detail

maxSize

protected abstract int maxSize()
Get the max bundle size that can be used for this bundler.

Returns:
the bundle size as an int.

feedback

public void feedback(int bundleSize,
                     double totalTime)
This method does nothing and should be overriden in subclasses.

Specified by:
feedback in interface Bundler
Parameters:
bundleSize - not used.
totalTime - not used.
See Also:
Bundler.feedback(int, double)

getTimestamp

public long getTimestamp()
Get the timestamp at which this bundler was created. This is used to enable node channels to know when the bundler settings have changed.

Specified by:
getTimestamp in interface Bundler
Returns:
the timestamp as a long value.
See Also:
Bundler.getTimestamp()

getBundlerNumber

public int getBundlerNumber()
Get the bundler number for this bundler.

Returns:
the bundler number as an int.

setup

public void setup()
Perform context-independant initializations.

Specified by:
setup in interface Bundler
See Also:
Bundler.setup()

dispose

public void dispose()
Release the resources used by this bundler.

Specified by:
dispose in interface Bundler
See Also:
Bundler.dispose()

getProfile

public LoadBalancingProfile getProfile()
Get the parameters of the algorithm, grouped as a performance analysis profile.

Specified by:
getProfile in interface Bundler
Returns:
an instance of LoadBalancingProfile.
See Also:
Bundler.getProfile()


Copyright © 2005-2010 JPPF Team.