org.apache.java.recycle
Class MinMaxController

java.lang.Object
  |
  +--org.apache.java.recycle.MinMaxController

public class MinMaxController
extends java.lang.Object
implements Controller

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.


Constructor Summary
MinMaxController()
           
 
Method Summary
 void down()
          Writes on the memory of this controller decrementing the level.
 boolean isThereRoomFor(Recyclable object)
          Evaluates the room for the object to recycle basing this decision to the optimum level estrapolated from the level history.
 void up()
          Writes on the memory of this controller incrementing 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

up

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

down

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

isThereRoomFor

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