Package com.alibaba.cobar.client.support

Examples of com.alibaba.cobar.client.support.LRUMap


        if (isEnableCache()) {
            ProxyFactory proxyFactory = new ProxyFactory(routerToUse);
            proxyFactory.setInterfaces(new Class[] { ICobarRouter.class });
            RoutingResultCacheAspect advice = new RoutingResultCacheAspect();
            if (cacheSize > 0) {
                advice.setInternalCache(new LRUMap(cacheSize));
            }
            proxyFactory.addAdvice(advice);
            this.router = (ICobarRouter<IBatisRoutingFact>) proxyFactory.getProxy();
        } else {
            this.router = routerToUse;
View Full Code Here


    }

    public CobarClientInternalRouter(boolean enableCache, int cacheSize) {
        this.enableCache = enableCache;
        if (this.enableCache) {
            localCache = new LRUMap(cacheSize);
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.cobar.client.support.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.