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

    Fields
    Modifier and Type
    Field
    Description
    static final AtomicInteger
    Count of the bundlers used to generate a readable unique id.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Release the resources used by this bundler.
    void
    feedback(int nbTasks, double totalTime)
    Provide feedback from a channel after execution of a set of tasks.
    int
    Get the current bundle size.
    Get the parameters profile used by this load-balancer.
    long
    Get the timestamp at which this bundler was created.
    void
    Perform context-independent initializations.
  • Field Details

    • BUNDLER_COUNT

      static final AtomicInteger 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.