Package org.apache.commons.collections.map

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


            this.cacheKey = field + '\uFFFF' + propName + '\uFFFF' + transform +'\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

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

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

        // TODO: cache size should really be a sum of all result lists sizes...
        // so we must track it outside the LRUMap...
        this.snapshotLists = 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

        // 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

     * @see AbstractAuthenticator
     */
    public SimpleAuthenticator()
    {
        super( AuthenticationLevel.SIMPLE );
        credentialCache = new LRUMap( DEFAULT_CACHE_SIZE );
    }
View Full Code Here

     */
    public SimpleAuthenticator( int cacheSize )
    {
        super( AuthenticationLevel.SIMPLE );

        credentialCache = new LRUMap( cacheSize > 0 ? cacheSize : DEFAULT_CACHE_SIZE );
    }
View Full Code Here

    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[1];
        if (securitySession instanceof SessionImpl) {
            NameResolver resolver = (SessionImpl) securitySession;
View Full Code Here

    /**
     * Ctor.
     */
    public SourceCacheImpl() {
        cache = new LRUMap(CAPACITY);
    }
View Full Code Here

     *
     * @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

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

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

TOP

Related Classes of org.apache.commons.collections.map.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.