Package java.util.concurrent.locks.ReentrantReadWriteLock

Examples of java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.unlock()


              try
              {
                export(resultPool,destfile,true,true, job.getCursorMap());
              }
              finally{
                readLock.unlock();
              }
             
            }
            else
            {
View Full Code Here


            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return pool.getNumIdle();
            } finally {
                readLock.unlock();
            }
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return pool.getNumActive();
            } finally {
                readLock.unlock();
            }
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return keyedPool.getNumIdle(key);
            } finally {
                readLock.unlock();
            }
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return keyedPool.getNumActive(key);
            } finally {
                readLock.unlock();
            }
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return keyedPool.getNumIdle();
            } finally {
                readLock.unlock();
            }
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return keyedPool.getNumActive();
            } finally {
                readLock.unlock();
            }
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

        lock.lock();
        try {
            checkLoaded();
            version = data.getVersion(packageKey);
        } finally {
            lock.unlock();
        }

        return version;
    }
View Full Code Here

        lock.lock();
        try {
            checkLoaded();
            data.setVersion(packageKey, version);
        } finally {
            lock.unlock();
        }
    }

    /**
     * Called by the get/set version methods to ensure the caller has properly initialized the data storage.
View Full Code Here

    ReadLock rl = _lock.readLock();
    rl.lock();
    try {
      return call.call();
    } finally {
      rl.unlock();
    }
  }
 
  public void runReadOperation(Runnable r)
  {
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.