org.jwarp.util.recycle
Class MinMaxController

java.lang.Object
  |
  +--org.jwarp.util.recycle.MinMaxController
All Implemented Interfaces:
IController

public class MinMaxController
extends java.lang.Object
implements IController

This level controller is based on a simpler variance method: the variance of the request frequency is obtained from the difference between the minimum and maximum value of the level. The stability of the system is not much, but it consumes a lot lesser time resources that GaussianController.

Author:
Anatole Tresch

Constructor Summary
MinMaxController()
           
 
Method Summary
 boolean canAddObject(IRecyclable object)
          Evaluates the room for the object to recycle basing this decision to the optimum level estrapolated from the level history.
 void objectAdded()
          Writes on the memory of this controller incrementing the level.
 void objectRemoved()
          Writes on the memory of this controller decrementing the level.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinMaxController

public MinMaxController()
Method Detail

objectAdded

public void objectAdded()
Writes on the memory of this controller incrementing the level.
Specified by:
objectAdded in interface IController

objectRemoved

public void objectRemoved()
Writes on the memory of this controller decrementing the level.
Specified by:
objectRemoved in interface IController

canAddObject

public boolean canAddObject(IRecyclable object)
Evaluates the room for the object to recycle basing this decision to the optimum level estrapolated from the level history.
Specified by:
canAddObject in interface IController

©   O R C A   S y s t e m s