Package io.aleph.dirigiste
Interface IPool.Controller<K>
public static interface IPool.Controller<K>
-
Method Summary
Modifier and TypeMethodDescriptionadjustment
(Map<K, Stats> stats) boolean
shouldIncrement
(K key, int objectsForKey, int totalObjects)
-
Method Details
-
shouldIncrement
- Parameters:
key
- the key which requires a new objectobjectsForKey
- the number of currently existing objects for 'key'totalObjects
- the total number of objects across every key- Returns:
- 'true' if a new object under 'key' should be created, false otherwise
-
adjustment
- Parameters:
stats
- a map of key onto stats for that key- Returns:
- a map of key onto how many objects should be created (if positive) or disposed (if negative)
-