Examples of ReentrantReadWriteLock


Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    Lock readLock = lock.readLock();
    acquireLock( key, timeout, readLock );
  }

  private ReadWriteLock getLock(EntityKey key) {
    ReadWriteLock newLock = new ReentrantReadWriteLock();
    ReadWriteLock previous = dataLocks.putIfAbsent( key, newLock );
    return previous != null ? previous : newLock;
  }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

            if (beanContext.isBeanManagedConcurrency()){
                // Bean-Managed Concurrency
                lock = new BeanManagedLock();
            } else {
                // Container-Managed Concurrency
                lock = new ReentrantReadWriteLock();
            }

            return new Instance(context.getBean(), context.getInterceptors(), context.getCreationalContext(), lock);
        } catch (Throwable e) {
            if (e instanceof java.lang.reflect.InvocationTargetException) {
View Full Code Here

Examples of org.exist.storage.lock.ReentrantReadWriteLock

    private final AddValueLoggable addValueLog = new AddValueLoggable();

    public DOMFile(BrokerPool pool, byte id, String dataDir, Configuration config) throws DBException {
        super(pool, id, true, pool.getCacheManager(), 0.01);
        lock = new ReentrantReadWriteLock(getFileName());
        fileHeader = (BTreeFileHeader)getFileHeader();
        fileHeader.setPageCount(0);
        fileHeader.setTotalCount(0);
        dataCache = new LRUCache(256, 0.0, 1.0, CacheManager.DATA_CACHE);
        dataCache.setFileName(getFileName());
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.