Package org.apache.cayenne.cache

Examples of org.apache.cayenne.cache.MapQueryCache


        if (queryCache == null) {
            synchronized (this) {
                if (queryCache == null) {
                    // TODO: andrus, 7/27/2006 - figure out the factory stuff like we have
                    // in DataContext
                    queryCache = new MapQueryCache();
                }
            }
        }
       
        return queryCache;
View Full Code Here


            public void configure(Binder binder) {
                binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                binder.bind(DataDomain.class).toInstance(domain);
                binder.bind(EventManager.class).toInstance(eventManager);
                binder.bind(QueryCache.class).toInstance(new MapQueryCache(5));
                binder
                        .bind(
                                Key.get(
                                        QueryCache.class,
                                        BaseContext.QUERY_CACHE_INJECTION_KEY))
                        .toInstance(new MapQueryCache(5));
            }
        };

        Injector injector = DIBootstrap.createInjector(testModule);
View Full Code Here

            public void configure(Binder binder) {
                binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                binder.bind(DataDomain.class).toInstance(domain);
                binder.bind(EventManager.class).toInstance(eventManager);
                binder.bind(QueryCache.class).toInstance(new MapQueryCache(5));
                binder
                        .bind(
                                Key.get(
                                        QueryCache.class,
                                        BaseContext.QUERY_CACHE_INJECTION_KEY))
                        .toInstance(new MapQueryCache(5));
            }
        };

        Injector injector = DIBootstrap.createInjector(testModule);
View Full Code Here

    protected DataContext context;

    @Override
    protected void setUp() throws Exception {
        oldCache = getDomain().getQueryCache();
        getDomain().setQueryCache(new MapQueryCache(50));
        context = createDataContextWithSharedCache(true);
        context.setQueryCache(new MapQueryCache(50));
    }
View Full Code Here

        // we want events, but we don't want thread eaks, so creating single threaded EM.
                // TODO: replace with container managed ClientCase.
                new DefaultEventManager(0),
                false);
        CayenneContext context = new CayenneContext(channel, true, true);
        context.setQueryCache(new MapQueryCache(10));
        return context;
    }
View Full Code Here

        if (queryCache == null) {
            synchronized (this) {
                if (queryCache == null) {
                    // TODO: andrus, 7/27/2006 - figure out the factory stuff like we have
                    // in DataContext
                    queryCache = new MapQueryCache();
                }
            }
        }
       
        return queryCache;
View Full Code Here

        }

        this.domain = new DataDomain("temp");
        domain.setEventManager(new DefaultEventManager(2));
        domain.setEntitySorter(new AshwoodEntitySorter());
        domain.setQueryCache(new MapQueryCache(50));

        try {
            for (DataMap map : maps) {
                initNode(map);
            }
View Full Code Here

        }

        this.domain = new DataDomain("temp");
        domain.setEventManager(new DefaultEventManager(2));
        domain.setEntitySorter(new AshwoodEntitySorter());
        domain.setQueryCache(new MapQueryCache(50));

        try {
            for (DataMap map : maps) {
                initNode(map);
            }
View Full Code Here

        if (queryCache == null) {
            synchronized (this) {
                if (queryCache == null) {
                    // TODO: andrus, 7/27/2006 - figure out the factory stuff like we have
                    // in DataContext
                    queryCache = new MapQueryCache();
                }
            }
        }

        return queryCache;
View Full Code Here

        if (queryCache == null) {
            synchronized (this) {
                if (queryCache == null) {
                    // TODO: andrus, 7/27/2006 - figure out the factory stuff like we have
                    // in DataContext
                    queryCache = new MapQueryCache();
                }
            }
        }

        return queryCache;
View Full Code Here

TOP

Related Classes of org.apache.cayenne.cache.MapQueryCache

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.