/** * Acquires an object of type {@code T} from the pool. This operation is blocking if no resource * is available. Each call of {@link #acquire()} should be paired with another call of * {@link #release(Object)}} after the use of this resource completes to return this resource to * the pool. * * @return a resource taken from the pool */ @Override public T acquire() { return acquire(WAIT_INDEFINITELY, null); }
blockLock = mLockPool.acquire(1, TimeUnit.SECONDS); if (blockLock != null) { synchronized (mSharedMapsLock) {
/** * Acquires an object of type {@code T} from the pool. This operation is blocking if no resource * is available. Each call of {@link #acquire()} should be paired with another call of * {@link #release(Object)}} after the use of this resource completes to return this resource to * the pool. * * @return a resource taken from the pool */ @Override public T acquire() { return acquire(WAIT_INDEFINITELY, null); }