public interface WriteBehindProvider extends Service
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.
Modifier and Type | Method and Description |
---|---|
<K,V> CacheLoaderWriter<K,V> |
createWriteBehindLoaderWriter(java.util.function.Consumer<K> keyCleanUpMethod,
CacheLoaderWriter<K,V> cacheLoaderWriter,
WriteBehindConfiguration<?> configuration)
Creates write-behind decorated
CacheLoaderWriter according to the
given configuration. |
void |
releaseWriteBehindLoaderWriter(CacheLoaderWriter<?,?> cacheLoaderWriter)
Releases a write-behind decorator when the associated
Cache
is finished with it. |
<K,V> CacheLoaderWriter<K,V> createWriteBehindLoaderWriter(java.util.function.Consumer<K> keyCleanUpMethod, CacheLoaderWriter<K,V> cacheLoaderWriter, WriteBehindConfiguration<?> configuration)
CacheLoaderWriter
according to the
given configuration.K
- the key type for the loader writerV
- the value type for the loader writerkeyCleanUpMethod
- cleanup Method to clean failurescacheLoaderWriter
- the CacheLoaderWriter
to decorateconfiguration
- the write-behind configurationvoid releaseWriteBehindLoaderWriter(CacheLoaderWriter<?,?> cacheLoaderWriter)
Cache
is finished with it.cacheLoaderWriter
- the CacheLoaderWriter
to release