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 java.lang.Object
implements io.github.xanthic.cache.api.CacheProvider
Provides helper methods commonly used for implementing CacheProvider.
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractCacheProvider()  
  • Method Summary

    Modifier and Type Method Description
    protected io.github.xanthic.cache.api.domain.ExpiryType getExpiryType​(io.github.xanthic.cache.api.domain.ExpiryType type)  
    protected void handleExpiration​(java.time.Duration time, io.github.xanthic.cache.api.domain.ExpiryType type, java.util.function.BiConsumer<java.time.Duration,​io.github.xanthic.cache.api.domain.ExpiryType> registrar)  
    protected void handleUnsupportedExpiry​(java.time.Duration expiryTime)  
    protected io.github.xanthic.cache.api.domain.ExpiryType preferredType()  

    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

  • Method Details

    • handleUnsupportedExpiry

      protected void handleUnsupportedExpiry​(java.time.Duration expiryTime)
    • getExpiryType

      protected io.github.xanthic.cache.api.domain.ExpiryType getExpiryType​(io.github.xanthic.cache.api.domain.ExpiryType type)
    • handleExpiration

      protected void handleExpiration​(java.time.Duration time, io.github.xanthic.cache.api.domain.ExpiryType type, java.util.function.BiConsumer<java.time.Duration,​io.github.xanthic.cache.api.domain.ExpiryType> registrar)
    • preferredType

      protected io.github.xanthic.cache.api.domain.ExpiryType preferredType()