Example usage for org.apache.commons.collections.list NodeCachingLinkedList NodeCachingLinkedList

List of usage examples for org.apache.commons.collections.list NodeCachingLinkedList NodeCachingLinkedList

Introduction

In this page you can find the example usage for org.apache.commons.collections.list NodeCachingLinkedList NodeCachingLinkedList.

Prototype

public NodeCachingLinkedList(int maximumCacheSize) 

Source Link

Document

Constructor that species the maximum cache size.

Usage

From source file:org.opencms.xml.containerpage.CmsADESessionCache.java

/**
 * Initializes the session cache.<p>
 * /*  w  w  w .  j a  va 2 s . c o  m*/
 * @param cms the cms context
 */
public CmsADESessionCache(CmsObject cms) {

    // container element cache
    Map<String, CmsContainerElementBean> lruMapCntElem = new HashMap<String, CmsContainerElementBean>();
    m_containerElements = Collections.synchronizedMap(lruMapCntElem);

    // ADE recent lists
    int maxElems = 10;
    maxElems = OpenCms.getADEManager().getRecentListMaxSize(cms.getRequestContext().getCurrentUser());
    List<CmsContainerElementBean> adeRecentList = CmsCollectionsGenericWrapper
            .list(new NodeCachingLinkedList(maxElems));
    m_recentLists = Collections.synchronizedList(adeRecentList);
}