Package org.hcjf.utils
Class TtlCollection<K>
- java.lang.Object
-
- org.hcjf.utils.TtlCollection<K>
-
-
Constructor Summary
Constructors Constructor Description TtlCollection(java.lang.Long timeWindowsSize)
-
Method Summary
Modifier and Type Method Description protected voidaddInstance(K instance)Add instance into the ttl map.protected abstract voidremoveOldInstance(K instanceKey)This implementation remove the specific instance of the wrapped collection.protected voidremoveOldWindows()Removes all the old elements of the wrapped collection.
-
-
-
Method Detail
-
addInstance
protected final void addInstance(K instance)
Add instance into the ttl map.- Parameters:
instance- Instance to add.
-
removeOldWindows
protected final void removeOldWindows()
Removes all the old elements of the wrapped collection.
-
removeOldInstance
protected abstract void removeOldInstance(K instanceKey)
This implementation remove the specific instance of the wrapped collection.- Parameters:
instanceKey- Instance key.
-
-