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 Details

    • AbstractCacheProvider

      public AbstractCacheProvider()
  • Method Details

    • handleUnsupportedExpiry

      protected void handleUnsupportedExpiry(Duration expiryTime)
    • 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()