Class EntryEvictionConfiguration

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<String,​Object>
    Direct Known Subclasses:

    public class EntryEvictionConfiguration
    extends HashMap<String,​Object>
    This configuration class is used to add constraints in the configuration of the cache to create.

    CacheFactory factory = (CacheFactory) getComponentManager().lookup(CacheFactory.class, this.roleHint); CacheConfiguration conf = new CacheConfiguration(); LRUEvictionConfiguration lec = new LRUEvictionConfiguration(); lec.setMaxEntries(1); conf.put(LRUEvictionConfiguration.CONFIGURATIONID, lec);

    $Id: 8c63261a8d7b04a568a0bbf424f129bb3a68426e $
    See Also:
    Serialized Form
    • Constructor Detail

      • EntryEvictionConfiguration

        public EntryEvictionConfiguration()
    • Method Detail

      • setTimeToLive

        public void setTimeToLive​(int timeToLive)
        timeToLive - see getTimeToLive()
      • getTimeToLive

        public int getTimeToLive()
        the time a cache entry will continue to stay in the cache after being last accessed, in seconds. When the time is reached, the entry is expired and removed from the cache. In addition, when the cache reaches its maximum number of entries, the defined eviction algorithm is used (e.g. LRU) and thus an entry can stay less time in the cache than its maximum defined time.