Interface ResilienceStrategyProvider

All Superinterfaces:
Service

public interface ResilienceStrategyProvider extends Service
A Service that creates ResilienceStrategy instances.

A CacheManager will use the createResilienceStrategy(String, CacheConfiguration, RecoveryStore) and createResilienceStrategy(String, CacheConfiguration, RecoveryStore, CacheLoaderWriter) methods to create ResilienceStrategy instances for each Cache it manages.

  • Method Details

    • createResilienceStrategy

      <K, V> ResilienceStrategy<K,V> createResilienceStrategy(String alias, CacheConfiguration<K,V> configuration, RecoveryStore<K> recoveryStore)
      Creates a ResilienceStrategy for the Cache with the given alias and configuration using the given RecoveryStore.
      Type Parameters:
      K - the stores key type
      V - the stores value type
      Parameters:
      alias - the Cache alias in the CacheManager
      configuration - the configuration for the associated cache
      recoveryStore - the associated recovery store
      Returns:
      the ResilienceStrategy to be used by the Cache
    • createResilienceStrategy

      <K, V> ResilienceStrategy<K,V> createResilienceStrategy(String alias, CacheConfiguration<K,V> configuration, RecoveryStore<K> recoveryStore, CacheLoaderWriter<? super K,V> loaderWriter)
      Creates a ResilienceStrategy for the Cache with the given alias and configuration using the given RecoveryStore and CacheLoaderWriter
      Type Parameters:
      K - the stores key type
      V - the stores value type
      Parameters:
      alias - the Cache alias in the CacheManager
      configuration - the configuration for the associated cache
      recoveryStore - the associated recovery store
      loaderWriter - the associated loader-writer
      Returns:
      the ResilienceStrategy to be used by the Cache