org.jppf.server.scheduler.bundle.rl
Class AbstractRLBundler

java.lang.Object
  extended by org.jppf.server.scheduler.bundle.AbstractBundler
      extended by org.jppf.server.scheduler.bundle.rl.AbstractRLBundler
All Implemented Interfaces:
Bundler
Direct Known Subclasses:
RLBundler

public abstract class AbstractRLBundler
extends AbstractBundler

Bundler based on a reinforcement learning algorithm.

Author:
Laurent Cohen

Field Summary
protected  int action
          Action to take.
protected  int bundleSize
          The current bundle size.
protected  BundleDataHolder dataHolder
          Bounded memory of the past performance updates.
protected  int prevBundleSize
          The previous bundle size.
 
Fields inherited from class org.jppf.server.scheduler.bundle.AbstractBundler
bundlerNumber, profile, timestamp
 
Constructor Summary
AbstractRLBundler(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 size, double totalTime)
          This method computes the bundle size based on the new state of the server.
 void feedback2(int size, double totalTime)
          This method computes the bundle size based on the new state of the server.
 int getBundleSize()
          Get the current size of bundle.
 BundleDataHolder getDataHolder()
          Get the bounded memory of the past performance updates.
 void setBundleSize(int bundleSize)
          set the current size of bundle.
 void setup()
          Perform context-independant initializations.
 
Methods inherited from class org.jppf.server.scheduler.bundle.AbstractBundler
getBundlerNumber, getProfile, getTimestamp, maxSize
 
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
 

Field Detail

action

protected int action
Action to take.


dataHolder

protected BundleDataHolder dataHolder
Bounded memory of the past performance updates.


bundleSize

protected int bundleSize
The current bundle size.


prevBundleSize

protected int prevBundleSize
The previous bundle size.

Constructor Detail

AbstractRLBundler

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

Parameters:
profile - the parameters of the algorithm grouped as a performance analysis profile.
Method Detail

getBundleSize

public int getBundleSize()
Get the current size of bundle.

Returns:
the bundle size as an int value.
See Also:
Bundler.getBundleSize()

setBundleSize

public void setBundleSize(int bundleSize)
set the current size of bundle.

Parameters:
bundleSize - - the bundle size as an int value.

feedback

public void feedback(int size,
                     double totalTime)
This method computes the bundle size based on the new state of the server.

Specified by:
feedback in interface Bundler
Overrides:
feedback in class AbstractBundler
Parameters:
size - the number of tasks executed.
totalTime - the time in milliseconds it took to execute the tasks.
See Also:
AbstractBundler.feedback(int, double)

feedback2

public void feedback2(int size,
                      double totalTime)
This method computes the bundle size based on the new state of the server.

Parameters:
size - the number of tasks executed.
totalTime - the time in milliseconds it took to execute the tasks.
See Also:
AbstractBundler.feedback(int, double)

setup

public void setup()
Perform context-independant initializations.

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

dispose

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

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

getDataHolder

public BundleDataHolder getDataHolder()
Get the bounded memory of the past performance updates.

Returns:
a BundleDataHolder instance.


Copyright © 2005-2010 JPPF Team.