Class MemoryCache<T>


  • public class MemoryCache<T>
    extends Object
    • Constructor Detail

      • MemoryCache

        public MemoryCache​(io.vertx.core.Vertx vertx,
                           Optional<Duration> cleanUpTimerInterval,
                           Duration cacheTimeToLive,
                           int cacheSize)
    • Method Detail

      • add

        public void add​(String key,
                        T result)
      • remove

        public T remove​(String key)
      • get

        public T get​(String key)
      • containsKey

        public boolean containsKey​(String key)
      • getCacheSize

        public int getCacheSize()
      • clearCache

        public void clearCache()
      • stopTimer

        public void stopTimer​(io.vertx.core.Vertx vertx)
      • isTimerRunning

        public boolean isTimerRunning()