Package org.apache.openjpa.datacache

Examples of org.apache.openjpa.datacache.DataCacheManager


            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        dataCacheManagerPlugin.set(dcm);
    }

    public DataCacheManager getDataCacheManagerInstance() {
        DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
        if (dcm == null) {
            dcm =
                (DataCacheManager) dataCacheManagerPlugin.instantiate(
                    DataCacheManager.class, this);
            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        }
        return dcm;
    }
View Full Code Here


            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        dataCacheManagerPlugin.set(dcm);
    }

    public DataCacheManager getDataCacheManagerInstance() {
        DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
        if (dcm == null) {
            dcm =
                (DataCacheManager) dataCacheManagerPlugin.instantiate(
                    DataCacheManager.class, this);
            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        }
        return dcm;
    }
View Full Code Here

            opts = Configurations.parseProperties(getOptions());
        }
       
        String cacheName = opts.getProperty("name",null);
        OpenJPAConfiguration conf = (OpenJPAConfiguration)getProvider().getConfiguration();
        DataCacheManager dcm = conf.getDataCacheManagerInstance();
        DataCache dc = null;
        if (cacheName == null || cacheName.trim().length() == 0) {
            dc = dcm.getSystemDataCache();
        } else {
            dc = dcm.getDataCache(cacheName);
        }
        if (dc == null) {
            throw new UserException(_loc.get("data-cache-not-found"));
        }
       
View Full Code Here

   
    @Override
    public void initialize() {
       
        OpenJPAConfiguration conf = (OpenJPAConfiguration)getProvider().getConfiguration();
        DataCacheManager dcm = conf.getDataCacheManagerInstance();
        QueryCache qc = dcm.getSystemQueryCache();
       
        if (qc == null) {
            throw new UserException(_loc.get("query-cache-not-found"));
        }
       
View Full Code Here

            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        dataCacheManagerPlugin.set(dcm);
    }

    public DataCacheManager getDataCacheManagerInstance() {
        DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
        if (dcm == null) {
            dcm = (DataCacheManager) dataCacheManagerPlugin.instantiate(DataCacheManager.class, this);
            if (dcm != null) {
                dcm.initialize(this, dataCachePlugin, queryCachePlugin);
            }
        }
        return dcm;
    }
View Full Code Here

            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        dataCacheManagerPlugin.set(dcm);
    }

    public DataCacheManager getDataCacheManagerInstance() {
        DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
        if (dcm == null) {
            dcm = (DataCacheManager) dataCacheManagerPlugin.instantiate(DataCacheManager.class, this);
            if (dcm != null) {
                dcm.initialize(this, dataCachePlugin, queryCachePlugin);
            }
        }
        return dcm;
    }
View Full Code Here

            t.start();
        }
        for(Thread t : workers){
            t.join();
        }
        DataCacheManager prev = dcms.get(0);
        for(DataCacheManager dcm : dcms){
            assertTrue(prev == dcm);
            prev = dcm;
        }
View Full Code Here

    private boolean dataCacheManagerInitialized = false;
    public DataCacheManager getDataCacheManagerInstance() {
        if (dataCacheManagerInitialized == false) {
            synchronized (this) {
                if (dataCacheManagerInitialized == false) {
                    DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
                    if (dcm == null) {
                        dcm = (DataCacheManager) dataCacheManagerPlugin.instantiate(DataCacheManager.class, this);
                        dcm.initialize(this, dataCachePlugin, queryCachePlugin);
                    }
                    dataCacheManagerInitialized = true;
                    return dcm;
                }
            }
View Full Code Here

            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        dataCacheManagerPlugin.set(dcm);
    }

    public DataCacheManager getDataCacheManagerInstance() {
        DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
        if (dcm == null) {
            dcm =
                (DataCacheManager) dataCacheManagerPlugin.instantiate(
                    DataCacheManager.class, this);
            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        }
        return dcm;
    }
View Full Code Here

            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        dataCacheManagerPlugin.set(dcm);
    }

    public DataCacheManager getDataCacheManagerInstance() {
        DataCacheManager dcm = (DataCacheManager) dataCacheManagerPlugin.get();
        if (dcm == null) {
            dcm =  (DataCacheManager) dataCacheManagerPlugin.instantiate(DataCacheManager.class, this);
            dcm.initialize(this, dataCachePlugin, queryCachePlugin);
        }
        return dcm;
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.datacache.DataCacheManager

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.