Code example for ReentrantReadWriteLock.ReadLock

Methods: lock, unlock

0
     * {@inheritDoc} 
     */ 
    @Override 
    public boolean getAllowWrite() 
    { 
        vetoReadLock.lock();
        try 
        { 
            return writeVeto.isEmpty() && this.sysAdminParams.getAllowWrite();
        } 
        finally 
        { 
            vetoReadLock.unlock();
        } 
    } 
     
    /** 
     * Set the read-only mode for all generated transactions. 
     * <p> 
     * Intended for use by spring configuration only.   Alfresco code should call the method which