org.jppf.server.scheduler.bundle.spi
Interface JPPFBundlerProvider

All Known Implementing Classes:
AutoTunedBundlerProvider, FixedSizeBundlerProvider, ProportionalBundlerProvider, RLBundlerProvider

public interface JPPFBundlerProvider

Interface for all load-balancing algorithm providers. An implementation of this interface shall be provided for each load-balancing algorithm, to enable its dynamic discovery by JPPF components.

To integrate a load-balancing algorithm provider, the following steps should be performed:

Author:
Laurent Cohen

Method Summary
 Bundler createBundler(LoadBalancingProfile profile)
          Create a bundler instance using the specified parameters profile.
 LoadBalancingProfile createProfile(TypedProperties configuration)
          Create a bundler profile containing the parameters of the algorithm.
 String getAlgorithmName()
          Get the name of the algorithm defined by this provider.
 

Method Detail

getAlgorithmName

String getAlgorithmName()
Get the name of the algorithm defined by this provider. Each algorithm must have a name distinct from that of all other algorithms.

Returns:
the algorithm's name as a string.

createBundler

Bundler createBundler(LoadBalancingProfile profile)
Create a bundler instance using the specified parameters profile.

Parameters:
profile - - an AutoTuneProfile instance.
Returns:
an instance of the bundler implementation defined by this provider.

createProfile

LoadBalancingProfile createProfile(TypedProperties configuration)

Create a bundler profile containing the parameters of the algorithm.

The configuration parameter contains a set of properties that define the parameters names and values.
The parameter names are provided without any JPPF configuration-specific prefix.

For example: if the JPPF configuration file specifies a profile named "myProfile" (through the property "jppf.load.balancing.strategy = myProfile"), and the algorithm has a parameter named "myParameter", then in the configuration file it will be specified as "strategy.myProfile.myParameter = some_value".
When this method is called, only the parameter name is kept, and its definition becomes "myParameter = some_value".

Parameters:
configuration - - a set of properties defining the algorithm's parameters.
Returns:
an AutoTuneProfile instance.


Copyright © 2005-2010 JPPF Team.