Interface PersistentState

All Known Implementing Classes:
AutoTunedBundler, ProportionalBundler, RL2Bundler

public interface PersistentState
This interface is implemented by load-balancers that wish to persist their state.
Since:
6.0
Author:
Laurent Cohen
  • Method Summary

    Modifier and Type
    Method
    Description
    Get this bundler's state.
    Get a lock that can be used to synchronize access to the load-balancer state.
    void
    Set this bundler's state.
  • Method Details

    • getState

      Object getState()
      Get this bundler's state.
      Returns:
      an Object representing the state of the load-balancer.
    • setState

      void setState(Object state)
      Set this bundler's state.
      Parameters:
      state - an Object representing the state of the load-balancer.
    • getStateLock

      Lock getStateLock()
      Get a lock that can be used to synchronize access to the load-balancer state. The main usage is to avoid race conditions when the state is serialized by the persistence thread, while it is being updated, in particular via its feedback() method, in another thread.
      Returns:
      a Lock object.