Package org.jppf.load.balancer.impl
Class ProportionalProfile
java.lang.Object
org.jppf.load.balancer.AbstractLoadBalancingProfile
org.jppf.load.balancer.impl.ProportionalProfile
- All Implemented Interfaces:
Serializable,LoadBalancingProfile
Parameters profile for a proportional bundler.
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize this profile with default parameters.ProportionalProfile(TypedProperties config) Initialize this profile with values read from the configuration file. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProportionalProfileGet the default profile with default parameter values.doubleGet the initial value of the mean execution time, used to bootstrap the algorithm.intGet the initial bundle size to use when the performance cache is empty.intGet the maximum size of the performance samples cache.intGet the proportionality factor.voidsetInitialMeanTime(double initialMeanTime) Set the initial value of the mean execution time, used to bootstrap the algorithm.voidsetInitialSize(int initialSize) Set the initial bundle size to use when the performance cache is empty.voidsetPerformanceCacheSize(int performanceCacheSize) Set the maximum size of the performance samples cache.voidsetProportionalityFactor(int proportionalityFactor) Set the proportionality factor.toString()Return a string representation of this profile.
-
Constructor Details
-
ProportionalProfile
public ProportionalProfile()Initialize this profile with default parameters. -
ProportionalProfile
Initialize this profile with values read from the configuration file.- Parameters:
config- contains a mapping of the profile parameters to their value.
-
-
Method Details
-
getPerformanceCacheSize
public int getPerformanceCacheSize()Get the maximum size of the performance samples cache.- Returns:
- the cache size as an int.
-
setPerformanceCacheSize
public void setPerformanceCacheSize(int performanceCacheSize) Set the maximum size of the performance samples cache.- Parameters:
performanceCacheSize- the cache size as an int.
-
getProportionalityFactor
public int getProportionalityFactor()Get the proportionality factor.- Returns:
- the factor as an int.
-
setProportionalityFactor
public void setProportionalityFactor(int proportionalityFactor) Set the proportionality factor.- Parameters:
proportionalityFactor- the factor as an int.
-
getDefaultProfile
Get the default profile with default parameter values.- Returns:
- a
ProportionalTuneProfilesingleton instance.
-
getInitialSize
public int getInitialSize()Get the initial bundle size to use when the performance cache is empty.- Returns:
- the initial size as an int.
-
setInitialSize
public void setInitialSize(int initialSize) Set the initial bundle size to use when the performance cache is empty.- Parameters:
initialSize- the initial size as an int.
-
getInitialMeanTime
public double getInitialMeanTime()Get the initial value of the mean execution time, used to bootstrap the algorithm.- Returns:
- the initial mean time as a double.
-
setInitialMeanTime
public void setInitialMeanTime(double initialMeanTime) Set the initial value of the mean execution time, used to bootstrap the algorithm.- Parameters:
initialMeanTime- the initial mean time as a double.
-
toString
Return a string representation of this profile.
-