Package org.apache.commons.collections.map

Examples of org.apache.commons.collections.map.LinkedMap.firstKey()


        // index is not available in the queue - the first index in the queue.
        if (events.containsKey(index)) {
            index = (Long) events.nextKey(index);
        }
        else {
            index = (Long) events.firstKey();
        }
       
       
        synchronized (events) {
            PortletEvent event;
View Full Code Here


       
        synchronized (events) {
            event.retrieveIndex();
            events.put(new Long(event.getIndex()), event);
            while (events.size() > EVENTQUEUE_MAX_SIZE) {
                events.remove(events.firstKey());
            }
        }
       
       
    }
View Full Code Here

                    Long lastProcessedIndex = new Long(sessionContext.getLastProcessedEventIndex());
                    if (list.containsKey(lastProcessedIndex)) {
                        startIndex = (Long) list.nextKey(lastProcessedIndex);
                    }
                    else {
                        startIndex = (Long) list.firstKey();
                    }
                   
                    // Set start index as WebTML option
                    tag.getStatus().setOption(Base.OPTION_PORTLET_EVENT_STARTINDEX, new Long(sessionContext.getLastProcessedEventIndex()), null);
                   
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.