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
-
Method Details
-
getState
Object getState()Get this bundler's state.- Returns:
- an Object representing the state of the load-balancer.
-
setState
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 itsfeedback()method, in another thread.- Returns:
- a
Lockobject.
-