Package com.ultikits.ultitools.manager
Interface PlayerCacheManager.ExpiringPlayerCache
- All Known Implementing Classes:
CooldownValidator
- Enclosing class:
PlayerCacheManager
public static interface PlayerCacheManager.ExpiringPlayerCache
Opt-in contract for a tracked instance that also carries time-based (as opposed to
player-quit-based) state to prune. Implemented by anything registered with this manager
that wants
PlayerCacheManager.sweepExpiredEntries()'s periodic pass to invoke it -- narrow and
type-checked rather than reflection guessing at a method name, so an instance that does not
implement this is definitively not visited.- Since:
- 6.3.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked once perPlayerCacheManager.sweepExpiredEntries()pass.
-
Method Details
-
sweepExpired
void sweepExpired()Invoked once perPlayerCacheManager.sweepExpiredEntries()pass. Implementations should be cheap and must not rely on being called on the main thread. An exception orErrorthrown here is caught and logged by the caller; it aborts only this instance's own sweep for the current pass, not the pass as a whole.
-