Package org.apache.openjpa.util

Examples of org.apache.openjpa.util.CacheMap


            }

            if (cache instanceof DelegatingDataCache)
                cache = ((DelegatingDataCache) cache).getInnermostDelegate();
            if (cache instanceof ConcurrentDataCache) {
                CacheMap map = ((ConcurrentDataCache) cache).getCacheMap();
                map.setCacheSize(3);
                map.setSoftReferenceSize(0);
            }

            startTx(em);
            CacheObjectH h = new CacheObjectH("h");
            em.persist(h);
View Full Code Here


    /**
     * Return the map to use as an internal cache.
     */
    protected CacheMap newCacheMap() {
        CacheMap res = new CacheMap(_lru);
       
        return res;
    }
View Full Code Here

    /**
     * Return the map to use as an internal cache; entry expirations must
     * invoke {@link AbstractDataCache#keyRemoved}.
     */
    protected CacheMap newCacheMap() {
        CacheMap res = new CacheMap(_lru) {
            protected void entryRemoved(Object key, Object value, boolean expired) {
                keyRemoved(key, expired);
            }
        };
       
View Full Code Here

            }

            if (cache instanceof DelegatingDataCache)
                cache = ((DelegatingDataCache) cache).getInnermostDelegate();
            if (cache instanceof ConcurrentDataCache) {
                CacheMap map = ((ConcurrentDataCache) cache).getCacheMap();
                map.setCacheSize(3);
                map.setSoftReferenceSize(0);
            }

            startTx(em);
            CacheObjectH h = new CacheObjectH("h");
            em.persist(h);
View Full Code Here

  private Lock _readLock;
  private Log _log;
    private static Localizer _loc = Localizer.forPackage(PreparedQueryCacheImpl.class);
   
  public PreparedQueryCacheImpl() {
    _delegate = new CacheMap();
    _uncachables = new CacheMap();
    _exclusionPatterns = new ArrayList<Exclusion>();
   
    ReentrantReadWriteLock _rwl = new ReentrantReadWriteLock();
        _writeLock = _rwl.writeLock();
        _readLock = _rwl.readLock();
View Full Code Here

     * query cache.
     *
     */
    protected int queryCacheGet() {
        ConcurrentQueryCache dcache = getQueryCache();
        CacheMap map = dcache.getCacheMap();
        return map.size();
    }
View Full Code Here

  private Lock _readLock;
  private Log _log;
    private static Localizer _loc = Localizer.forPackage(PreparedQueryCacheImpl.class);
   
  public PreparedQueryCacheImpl() {
    _delegate = new CacheMap();
    _uncachables = new CacheMap();
    _exclusionPatterns = new ArrayList<Exclusion>();
   
    ReentrantReadWriteLock _rwl = new ReentrantReadWriteLock();
        _writeLock = _rwl.writeLock();
        _readLock = _rwl.readLock();
View Full Code Here

    /**
     * Return the map to use as an internal cache; entry expirations must
     * invoke {@link AbstractDataCache#keyRemoved}.
     */
    protected CacheMap newCacheMap() {
        CacheMap res = new CacheMap(_lru) {
            protected void entryRemoved(Object key, Object value, boolean expired) {
                keyRemoved(key, expired);
            }
        };
       
View Full Code Here

            }

            if (cache instanceof DelegatingDataCache)
                cache = ((DelegatingDataCache) cache).getInnermostDelegate();
            if (cache instanceof ConcurrentDataCache) {
                CacheMap map = ((ConcurrentDataCache) cache).getCacheMap();
                map.setCacheSize(3);
                map.setSoftReferenceSize(0);
            }

            startTx(em);
            CacheObjectH h = new CacheObjectH("h");
            em.persist(h);
View Full Code Here

  private ReentrantLock _lock = new ReentrantLock();
  private Log _log;
    private static Localizer _loc = Localizer.forPackage(PreparedQueryCacheImpl.class);
   
  public PreparedQueryCacheImpl() {
    _delegate = new CacheMap();
    _uncachables = new CacheMap();
    _exclusionPatterns = new ArrayList<Exclusion>();
  }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.util.CacheMap

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.