Package org.apache.commons.collections

Examples of org.apache.commons.collections.LRUMap


  public synchronized int size() {
    return cache.size();
  }

  private void init() {
    cache = new LRUMap( strongReferenceCount );
  }
View Full Code Here


  public synchronized int softSize() {
    return softReferenceCache.size();
  }

  private void init() {
    strongReferenceCache = new LRUMap( strongReferenceCount );
  }
View Full Code Here

     * @param globalCacheSize maximum size in objects of global cache
     * @param name the name used to construct logging category / channel
     * @param logger Slide logger to be used for logging
     */
    public TxLRUObjectCache(int globalCacheSize, String name, Logger logger) {
        globalCache = new LRUMap(globalCacheSize);
        txChangeCaches = new HashMap();
        txDeleteCaches = new HashMap();

        this.name = name;
        this.logger = logger;
View Full Code Here

     * @param logger Slide logger to be used for logging
     * @param noGlobalCachingInsideTx indicates global caches are enabled, but shall not be used inside transactions
     */
    public TxLRUObjectCache(int globalCacheSize, String name, Logger logger, boolean noGlobalCachingInsideTx) {
        if (globalCacheSize != -1) {
            globalCache = new LRUMap(globalCacheSize);
        }
        txChangeCaches = new HashMap();
        txDeleteCaches = new HashMap();

        this.name = name;
View Full Code Here

     * @param globalCacheSize maximum size in objects of global cache
     * @param name the name used to construct logging category / channel
     * @param logger Slide logger to be used for logging
     */
    public TxLRUObjectCache(int globalCacheSize, String name, Logger logger) {
        globalCache = new LRUMap(globalCacheSize);
        txChangeCaches = new HashMap();
        txDeleteCaches = new HashMap();

        this.name = name;
        this.logger = logger;
View Full Code Here

        this.dirContext = dirContext;
        if (dirContext instanceof BaseDirContext) {
            // Initialize parameters based on the associated dir context, like
            // the caching policy.
            if (((BaseDirContext) dirContext).isCached()) {
                cache = Collections.synchronizedMap(new LRUMap(cacheSize));
                cacheTTL = ((BaseDirContext) dirContext).getCacheTTL();
                cacheObjectMaxSize =
                    ((BaseDirContext) dirContext).getCacheObjectMaxSize();
            }
        }
View Full Code Here

         * @param hardSize the maximum capacity of this map
         */
        public SoftHashMap(final int hardSize)
        {
            hash = new HashMap();
            hardCacheMap = new LRUMap(hardSize);
            queue = new ReferenceQueue();
        }
View Full Code Here

        this.dirContext = dirContext;
        if (dirContext instanceof BaseDirContext) {
            // Initialize parameters based on the associated dir context, like
            // the caching policy.
            if (((BaseDirContext) dirContext).isCached()) {
                cache = Collections.synchronizedMap(new LRUMap(cacheSize));
                cacheTTL = ((BaseDirContext) dirContext).getCacheTTL();
                cacheObjectMaxSize =
                    ((BaseDirContext) dirContext).getCacheObjectMaxSize();
            }
        }
View Full Code Here

        this.dirContext = dirContext;
        if (dirContext instanceof BaseDirContext) {
            // Initialize parameters based on the associated dir context, like
            // the caching policy.
            if (((BaseDirContext) dirContext).isCached()) {
                cache = Collections.synchronizedMap(new LRUMap(cacheSize));
                cacheTTL = ((BaseDirContext) dirContext).getCacheTTL();
                cacheObjectMaxSize =
                    ((BaseDirContext) dirContext).getCacheObjectMaxSize();
            }
        }
View Full Code Here

        this.dirContext = dirContext;
        if (dirContext instanceof BaseDirContext) {
            // Initialize parameters based on the associated dir context, like
            // the caching policy.
            if (((BaseDirContext) dirContext).isCached()) {
                cache = Collections.synchronizedMap(new LRUMap(cacheSize));
                cacheTTL = ((BaseDirContext) dirContext).getCacheTTL();
                cacheObjectMaxSize =
                    ((BaseDirContext) dirContext).getCacheObjectMaxSize();
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.LRUMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.