Package org.jppf.load.balancer
Interface Bundler<T extends LoadBalancingProfile>
- Type Parameters:
T- the type of parameters profile used by this bundler.
- All Known Subinterfaces:
BundlerEx<T>
- All Known Implementing Classes:
AbstractAdaptiveBundler,AbstractBundler,AutoTunedBundler,AutotunedDelegatingBundler,FixedSizeBundler,NodeThreadsBundler,ProportionalBundler,RL2Bundler
public interface Bundler<T extends LoadBalancingProfile>
This is the interface of all strategies for defining bundle task size.
A Bundler defines the current bundle size using different algorithms, depending on the implementation.
- Author:
- Domingos Creado, Laurent Cohen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AtomicIntegerCount of the bundlers used to generate a readable unique id. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Release the resources used by this bundler.voidfeedback(int nbTasks, double totalTime) Provide feedback from a channel after execution of a set of tasks.intGet the current bundle size.Get the parameters profile used by this load-balancer.longGet the timestamp at which this bundler was created.voidsetup()Perform context-independent initializations.
-
Field Details
-
BUNDLER_COUNT
Count of the bundlers used to generate a readable unique id.
-
-
Method Details
-
getBundleSize
int getBundleSize()Get the current bundle size.- Returns:
- the bundle size as an int value.
-
feedback
void feedback(int nbTasks, double totalTime) Provide feedback from a channel after execution of a set of tasks. The feedback data consists in providing a number of tasks that were executed, and their total execution time in milliseconds. The execution time includes the network round trip between node and server.- Parameters:
nbTasks- number of tasks that were executed.totalTime- the total execution and transport time in nanoseconds.
-
getTimestamp
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.- Returns:
- the timestamp as a long value.
-
dispose
void dispose()Release the resources used by this bundler. -
setup
void setup()Perform context-independent initializations. -
getProfile
T getProfile()Get the parameters profile used by this load-balancer.- Returns:
- an instance of
LoadBalancingProfile.
-