Package io.github.xanthic.cache.core
Class AbstractCacheProvider
java.lang.Object
io.github.xanthic.cache.core.AbstractCacheProvider
- All Implemented Interfaces:
io.github.xanthic.cache.api.CacheProvider
public abstract class AbstractCacheProvider
extends Object
implements io.github.xanthic.cache.api.CacheProvider
Provides helper methods commonly used for implementing
CacheProvider
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected io.github.xanthic.cache.api.domain.ExpiryType
getExpiryType
(io.github.xanthic.cache.api.domain.ExpiryType type) protected void
handleExpiration
(Duration time, io.github.xanthic.cache.api.domain.ExpiryType type, BiConsumer<Duration, io.github.xanthic.cache.api.domain.ExpiryType> registrar) protected void
handleUnsupportedExpiry
(Duration expiryTime) protected io.github.xanthic.cache.api.domain.ExpiryType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.xanthic.cache.api.CacheProvider
build
-
Constructor Details
-
AbstractCacheProvider
public AbstractCacheProvider()
-
-
Method Details
-
handleUnsupportedExpiry
-
getExpiryType
protected io.github.xanthic.cache.api.domain.ExpiryType getExpiryType(io.github.xanthic.cache.api.domain.ExpiryType type) -
handleExpiration
protected void handleExpiration(Duration time, io.github.xanthic.cache.api.domain.ExpiryType type, BiConsumer<Duration, io.github.xanthic.cache.api.domain.ExpiryType> registrar) -
preferredType
protected io.github.xanthic.cache.api.domain.ExpiryType preferredType()
-