Class ReplayCache

    • Constructor Detail

      • ReplayCache

        public ReplayCache()
    • Method Detail

      • setStorage

        public void setStorage​(@Nonnull
                               StorageService storageService)
        Set the backing store for the cache.
        Parameters:
        storageService - backing store to use
      • isStrict

        public boolean isStrict()
        Get the strictness flag.
        Returns:
        true iff we should treat storage failures as a replay
      • setStrict

        public void setStrict​(boolean flag)
        Set the strictness flag.
        Parameters:
        flag - true iff we should treat storage failures as a replay
      • check

        public boolean check​(@Nonnull @NotEmpty
                             String context,
                             @Nonnull @NotEmpty
                             String s,
                             @Nonnull
                             Instant expires)
        Returns true iff the check value is not found in the cache, and stores it.
        Parameters:
        context - a context label to subdivide the cache
        s - value to check
        expires - time for disposal of value from cache
        Returns:
        true iff the check value is not found in the cache