Class DefaultDeploymentCache<T>

  • All Implemented Interfaces:
    DeploymentCache<T>

    public class DefaultDeploymentCache<T>
    extends java.lang.Object
    implements DeploymentCache<T>
    Default cache: keep everything in memory, unless a limit is set.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​T> cache  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String id, T obj)  
      void clear()  
      boolean contains​(java.lang.String id)  
      T get​(java.lang.String id)  
      void remove​(java.lang.String id)  
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cache

        protected java.util.Map<java.lang.String,​T> cache
    • Constructor Detail

      • DefaultDeploymentCache

        public DefaultDeploymentCache()
        Cache with no limit
      • DefaultDeploymentCache

        public DefaultDeploymentCache​(int limit)
        Cache which has a hard limit: no more elements will be cached than the limit.