Module spring.retry

Class MapRetryContextCache

All Implemented Interfaces:
RetryContextCache

public class MapRetryContextCache extends AbstractMapRetryContextCache<RetryContext>
Map-based implementation of RetryContextCache. The map backing the cache of contexts is synchronized.
Author:
Dave Syer
  • Constructor Details

    • MapRetryContextCache

      public MapRetryContextCache()
      Create an instance with the default capacity
    • MapRetryContextCache

      public MapRetryContextCache(int capacity)
      Create an instance with the given capacity, removing the eldest entries when the cache is full
      Parameters:
      capacity - the initial capacity of the cache
    • MapRetryContextCache

      public MapRetryContextCache(int capacity, boolean removeEldestEntries)
      Create an instance with the given capacity and the policy to apply when the cache is full.
      Parameters:
      capacity - the size of the cache
      removeEldestEntries - whether to remove the eldest entries when the cache is full
      Since:
      1.3.5
  • Method Details