|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.java.recycle.MinMaxController
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.
Field Summary | |
private static int |
BIAS
This is the minimum value allowed to be reached. |
private int |
cursor
The pointer in the circular array. |
private int |
level
The current level. |
private int[] |
levels
The array of levels. |
private static int |
WINDOW
This is the log2 value of the sampling window. |
Constructor Summary | |
MinMaxController()
|
Method Summary | |
void |
down()
Writes on the memory of this controller decrementing the level. |
private int |
getLevel(int[] array)
Returns the predicted correct level calculating the max variable amplitude in levels statistics. |
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 |
|
Field Detail |
private static final int WINDOW
private static final int BIAS
private int level
private int[] levels
private int cursor
Constructor Detail |
public MinMaxController()
Method Detail |
public void up()
public void down()
public boolean isThereRoomFor(Recyclable object)
private int getLevel(int[] array)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |