Class ReferenceHashMapCacheService

  • All Implemented Interfaces:
    CacheService

    public class ReferenceHashMapCacheService
    extends java.lang.Object
    implements CacheService
    • Constructor Detail

      • ReferenceHashMapCacheService

        public ReferenceHashMapCacheService()
    • Method Detail

      • setMaxSize

        public void setMaxSize​(int maxSize)
      • setTrimTo

        public void setTrimTo​(int trimTo)
      • put

        public <V> void put​(java.lang.String key,
                            V value)
        Specified by:
        put in interface CacheService
      • putWithTTL

        public <V> void putWithTTL​(java.lang.String key,
                                   V value,
                                   long timeToLiveMillis)
        Specified by:
        putWithTTL in interface CacheService
      • get

        public <V> V get​(java.lang.String key)
        Specified by:
        get in interface CacheService
      • remove

        public int remove​(java.lang.String key)
        Specified by:
        remove in interface CacheService
      • containsKey

        public boolean containsKey​(java.lang.String key)
        Specified by:
        containsKey in interface CacheService