Examples of LRUMap


Examples of org.apache.commons.collections.map.LRUMap

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

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

Examples of org.apache.commons.collections.map.LRUMap

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

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

Examples of org.apache.commons.collections.map.LRUMap

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

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

Examples of org.apache.commons.collections.map.LRUMap

        // init ivars from properties
        this.notifyingRemoteListeners = notifyRemote;

        // TODO: ENTRY EXPIRATION is not supported by commons LRU Map
        this.snapshots = new LRUMap(snapshotsCacheSize);

        // init event bridge only if we are notifying remote listeners
        if (notifyingRemoteListeners) {
            try {
                EventBridgeFactory factory = (EventBridgeFactory) Class.forName(
View Full Code Here

Examples of org.apache.commons.collections.map.LRUMap

    private final Map<ItemState, Item> cache;

    @SuppressWarnings("unchecked")
    ItemCacheImpl(int maxSize) {
        cache = new LRUMap(maxSize);
    }
View Full Code Here

Examples of org.apache.commons.collections.map.LRUMap

        if (initCache) {
            cacheInitializer.run();
        }
        // limit cache to 1% of maxDoc(), but at least 10.
        this.docNumber2id = Collections.synchronizedMap(
                new LRUMap(Math.max(10, delegatee.maxDoc() / 100)));
        this.termDocsCache = new TermDocsCache(delegatee, FieldNames.PROPERTIES);
    }
View Full Code Here

Examples of org.apache.commons.collections.map.LRUMap

    public DefaultPrincipalProvider(Session securitySession,
                                    UserManagerImpl userManager) throws RepositoryException {

        this.userManager = userManager;
        everyonePrincipal = EveryonePrincipal.getInstance();
        membershipCache = new LRUMap();

        // listen to modifications of group-membership
        String[] ntNames = new String[2];
        if (securitySession instanceof SessionImpl) {
            NameResolver resolver = (NameResolver) securitySession;
View Full Code Here

Examples of org.apache.commons.collections.map.LRUMap

            this.cacheKey = key.toString();
            // check cache
            synchronized (cache) {
                Map m = (Map) cache.get(reader);
                if (m == null) {
                    m = new LRUMap(10);
                    cache.put(reader, m);
                }
                resultMap = m;
            }
            synchronized (resultMap) {
View Full Code Here

Examples of org.apache.commons.collections.map.LRUMap

            this.cacheKey = field + '\uFFFF' + propName + '\uFFFF' + pattern;
            // check cache
            synchronized (cache) {
                Map m = (Map) cache.get(reader);
                if (m == null) {
                    m = new LRUMap(10);
                    cache.put(reader, m);
                }
                resultMap = m;
            }
            synchronized (resultMap) {
View Full Code Here

Examples of org.apache.commons.collections.map.LRUMap

     *
     * @param maxSize the maximum size of the cache, -1 for no limit,
     */
    public LRUItemStateCache(int maxSize) {
        // setup cache
        cache = new LRUMap(maxSize, true);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.