Examples of LRUCache


Examples of org.apache.activemq.util.LRUCache

    private List<DestinationBridge> outboundBridges = new CopyOnWriteArrayList<DestinationBridge>();
    private String name;


    private static LRUCache createLRUCache() {
        return new LRUCache() {
            private static final long serialVersionUID = -7446792754185879286L;

            protected boolean removeEldestEntry(Map.Entry enty) {
                if (size() > maxCacheSize) {
                    Iterator iter = entrySet().iterator();
View Full Code Here

Examples of org.apache.activemq.util.LRUCache

    private List<DestinationBridge> outboundBridges = new CopyOnWriteArrayList<DestinationBridge>();
    private String name;


    private static LRUCache createLRUCache() {
        return new LRUCache() {
            private static final long serialVersionUID = -7446792754185879286L;

            protected boolean removeEldestEntry(Map.Entry enty) {
                if (size() > maxCacheSize) {
                    Iterator iter = entrySet().iterator();
View Full Code Here

Examples of org.apache.activemq.util.LRUCache

    private String name;

    protected LRUCache replyToBridges = createLRUCache();
     
    static private LRUCache createLRUCache() {
      return new LRUCache() {
          private static final long serialVersionUID = -7446792754185879286L;
 
          protected boolean removeEldestEntry(Map.Entry enty) {
              if (size() > maxCacheSize) {
                  Iterator iter = entrySet().iterator();
View Full Code Here

Examples of org.apache.camel.util.LRUCache

     * Creates a new MemoryMessageIdRepository with a memory based respository.
     * <b>Warning</b> this method should only really be used for testing as it
     * will involve keeping all message IDs in RAM.
     */
    public static MessageIdRepository memoryMessageIdRepository(int cacheSize) {
        return memoryMessageIdRepository(new LRUCache(cacheSize));
    }
View Full Code Here

Examples of org.apache.camel.util.LRUCache

     * Creates a new MemoryMessageIdRepository with a memory based repository.
     * <b>Warning</b> this method should only really be used for testing as it
     * will involve keeping all message IDs in RAM.
     */
    public static MessageIdRepository memoryMessageIdRepository(int cacheSize) {
        return memoryMessageIdRepository(new LRUCache(cacheSize));
    }
View Full Code Here

Examples of org.apache.camel.util.LRUCache

    protected BeanInfo createBeanInfo(Class<?> declaringClass) {
        return new BeanInfo(camelContext, declaringClass);
    }

    protected static Map createLruCache(int size) {
        return new LRUCache(size);
    }
View Full Code Here

Examples of org.apache.camel.util.LRUCache

     * @return the capacity
     */
    public int getCapacity() {
        int capacity = -1;
        if (producers instanceof LRUCache) {
            LRUCache cache = (LRUCache) producers;
            capacity = cache.getMaxCacheSize();
        }
        return capacity;
    }
View Full Code Here

Examples of org.apache.camel.util.LRUCache

     * @return the capacity
     */
    public int getCapacity() {
        int capacity = -1;
        if (producers instanceof LRUCache) {
            LRUCache cache = (LRUCache) producers;
            capacity = cache.getMaxCacheSize();
        }
        return capacity;
    }
View Full Code Here

Examples of org.apache.camel.util.LRUCache

     * Creates a new MemoryMessageIdRepository with a memory based respository.
     * <b>Warning</b> this method should only really be used for testing as it
     * will involve keeping all message IDs in RAM.
     */
    public static MessageIdRepository memoryMessageIdRepository(int cacheSize) {
        return memoryMessageIdRepository(new LRUCache(cacheSize));
    }
View Full Code Here

Examples of org.apache.camel.util.LRUCache

     * @return the capacity
     */
    public int getCapacity() {
        int capacity = -1;
        if (producers instanceof LRUCache) {
            LRUCache cache = (LRUCache) producers;
            capacity = cache.getMaxCacheSize();
        }
        return capacity;
    }
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.