Interface WriteBehindProvider

All Superinterfaces:
Service

public interface WriteBehindProvider extends Service
A Service that provides write-behind functionality.

A CacheManager will use the {Consumer, @link #createWriteBehindLoaderWriter(org.ehcache.spi.loaderwriter.CacheLoaderWriter, org.ehcache.spi.loaderwriter.WriteBehindConfiguration)} method to create write-behind instances for each Cache it manages that carries a write-behind configuration.

  • Method Details

    • createWriteBehindLoaderWriter

      <K, V> CacheLoaderWriter<K,V> createWriteBehindLoaderWriter(Consumer<K> keyCleanUpMethod, CacheLoaderWriter<K,V> cacheLoaderWriter, WriteBehindConfiguration<?> configuration)
      Creates write-behind decorated CacheLoaderWriter according to the given configuration.
      Type Parameters:
      K - the key type for the loader writer
      V - the value type for the loader writer
      Parameters:
      keyCleanUpMethod - cleanup Method to clean failures
      cacheLoaderWriter - the CacheLoaderWriter to decorate
      configuration - the write-behind configuration
      Returns:
      the write-behind decorated loader writer
    • releaseWriteBehindLoaderWriter

      void releaseWriteBehindLoaderWriter(CacheLoaderWriter<?,?> cacheLoaderWriter)
      Releases a write-behind decorator when the associated Cache is finished with it.
      Parameters:
      cacheLoaderWriter - the CacheLoaderWriter to release