Package org.apache.commons.collections.map

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


     *                  registration.
     * @param cacheSize number of mappings this resolver may cache.
     */
    public CachingNamespaceResolver(AbstractNamespaceResolver base, int cacheSize) {
        this.base = base;
        qnameToJCRName = new LRUMap(cacheSize);
        jcrNameToQName = new LRUMap(cacheSize);
        this.base.addListener(this);
    }
View Full Code Here

     */
    @SuppressWarnings("unchecked")   
    CachingEntryCollector(SessionImpl systemSession, NodeId rootID) throws RepositoryException {
        super(systemSession, rootID);
       
        cache = new LRUMap(1000);
    }
View Full Code Here

        if (initialized) {
            throw new IllegalStateException("already initialized");
        }

        int maxSize = Integer.parseInt(options.getProperty(MAXSIZE_KEY, "1000"));
        cache = new LRUMap(maxSize);
        includeNegative = Boolean.parseBoolean(options.getProperty(NEGATIVE_ENTRY_KEY, "false"));
       
        initialized = true;
    }
View Full Code Here

        this.systemSession = systemSession;
        this.systemEditor = systemEditor;

        repPolicyName = systemSession.getJCRName(N_POLICY);

        cache = new LRUMap(1000);

        ObservationManager observationMgr = systemSession.getWorkspace().getObservationManager();
        /*
         Make sure the collector and all subscribed listeners are informed upon
         ACL modifications. Interesting events are:
View Full Code Here

        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

        this.systemSession = systemSession;
        this.groupsPath = (groupsPath == null) ? UserConstants.GROUPS_PATH : groupsPath;
        this.useMembersNode = useMembersNode;

        pMembers = systemSession.getJCRName(UserManagerImpl.P_MEMBERS);
        cache = new LRUMap();
               
        String[] ntNames = new String[] {
                systemSession.getJCRName(UserConstants.NT_REP_GROUP),
                systemSession.getJCRName(UserConstants.NT_REP_MEMBERS)
        };
View Full Code Here

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

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

        credentialCache = new LRUMap( cacheSize > 0 ? cacheSize : DEFAULT_CACHE_SIZE );
    }
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

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.