Examples of writeLock()


Examples of EDU.oswego.cs.dl.util.concurrent.ReadWriteLock.writeLock()

    protected void setUp() throws Exception {
        super.setUp();
        ReadWriteLock l=new ReentrantWriterPreferenceReadWriteLock();
        rl=l.readLock();
        wl=l.writeLock();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock.writeLock()

    protected void setUp() throws Exception {
        super.setUp();
        ReadWriteLock l=new ReentrantWriterPreferenceReadWriteLock();
        rl=l.readLock();
        wl=l.writeLock();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }
View Full Code Here

Examples of ca.odell.glazedlists.util.concurrent.ReadWriteLock.writeLock()

        public DebugReadWriteLock() {
            // decorate normaly read/write locks with Thread recording
            final ReadWriteLock decorated = LockFactory.DEFAULT.createReadWriteLock();
            this.readLock = new DebugLock(decorated.readLock());
            this.writeLock = new DebugLock(decorated.writeLock());
        }

        public Lock readLock() { return readLock; }
        public Lock writeLock() { return writeLock; }
View Full Code Here

Examples of com.intellij.util.concurrency.JBReentrantReadWriteLock.writeLock()

  private final JBLock w;

  protected FieldCache() {
    JBReentrantReadWriteLock ourLock = LockFactory.createReadWriteLock();
    r = ourLock.readLock();
    w = ourLock.writeLock();
  }

  public T get(AccessorParameter a, Owner owner, Parameter p) {
    r.lock();
    T result;
View Full Code Here

Examples of com.netflix.curator.framework.recipes.locks.InterProcessReadWriteLock.writeLock()

        }else{
          lock.readLock().release();
        }
      }else{
        if(op == 'A'){
          lock.writeLock().acquire();
        }else{
          lock.writeLock().release();
        }
      }
    }catch(Exception e){
View Full Code Here

Examples of com.sun.corba.se.pept.transport.Connection.writeLock()

    public void sendMessage ()
    {
        Connection conn =
              ((OutputObject)outputObject).getMessageMediator().getConnection();

        conn.writeLock();

        try {

            conn.sendWithoutLock((OutputObject)outputObject);
View Full Code Here

Examples of java.util.concurrent.locks.ReadWriteLock.writeLock()

        for(int j = 0; j < locks.length; j++) {
            locks[j] = new ReentrantLock();
        }
        ReadWriteLock rwLock = new ReentrantReadWriteLock();
        readLock = rwLock.readLock();
        writeLock = rwLock.writeLock();
    }

    /**
     * double the set size
     */
 
View Full Code Here

Examples of java.util.concurrent.locks.ReadWriteLock.writeLock()

            if(lock == null) {
                lock = new ReentrantReadWriteLock();
                locks.put(key, lock);
            }
        }
        lock.writeLock().lock();
        return lock;
    }

    private static void releaseLock(final String key, final ReadWriteLock lock, final Map<String, ReadWriteLock> locks) {
        lock.writeLock().unlock();
View Full Code Here

Examples of java.util.concurrent.locks.ReadWriteLock.writeLock()

        }
        this.lifecycleManagerRegistry = lifecycleManagerRegistry;
        this.cacheByClass = new HashMap<Class<?>, ResourceRecord>();
        ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
        readersLock = readWriteLock.readLock();
        writersLock = readWriteLock.writeLock();

        if (customProperties == null) {
            customProperties = new Properties();
        }
View Full Code Here

Examples of java.util.concurrent.locks.ReadWriteLock.writeLock()

    // _lock = new Lock("block:" + store.getName() + ":" + Long.toHexString(_blockId));
    // ReadWriteLock rwLock = new ReentrantReadWriteLock();
    ReadWriteLock rwLock = new ReentrantReadWriteLock();
   
    _readLock = rwLock.readLock();
    _writeLock = rwLock.writeLock();

    _isFlushDirtyOnCommit = _store.isFlushDirtyBlocksOnCommit();

    _buffer = allocateBuffer();
   
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.