Class EHCacheReplayCache

  • All Implemented Interfaces:
    Closeable, AutoCloseable, ReplayCache

    public class EHCacheReplayCache
    extends Object
    implements ReplayCache
    An in-memory EHCache implementation of the ReplayCache interface, that overflows to disk. The default TTL is 60 minutes and the max TTL is 12 hours.
    • Method Detail

      • add

        public void add​(String identifier)
        Add the given identifier to the cache. It will be cached for a default amount of time.
        Specified by:
        add in interface ReplayCache
        Parameters:
        identifier - The identifier to be added
      • add

        public void add​(String identifier,
                        Instant expiry)
        Add the given identifier to the cache to be cached for the given time
        Specified by:
        add in interface ReplayCache
        Parameters:
        identifier - The identifier to be added
        expiry - A custom expiry time for the identifier. Can be null in which case, the default expiry is used.
      • contains

        public boolean contains​(String identifier)
        Return true if the given identifier is contained in the cache
        Specified by:
        contains in interface ReplayCache
        Parameters:
        identifier - The identifier to check
      • initComplete

        public void initComplete()
      • preShutdown

        public void preShutdown()
      • postShutdown

        public void postShutdown()