Package info.aduna.concurrent.locks

Examples of info.aduna.concurrent.locks.Lock.release()


      }
    }
    catch (SQLException exc) {
      logger.warn(exc.toString(), exc);
      if (lock != null) {
        lock.release();
      }
      return null;
    }
  }
View Full Code Here


        sign(infoFile);
      }
      catch (IOException e) {
        if (lock != null) {
          // Also closes raf
          lock.release();
        }
        else {
          raf.close();
        }
        throw e;
View Full Code Here

        initBNodeParams();

        setNewRevision();
      }
      finally {
        writeLock.release();
      }
    }
    catch (InterruptedException e) {
      IOException ioe = new IOException("Failed to acquire write lock");
      ioe.initCause(e);
View Full Code Here

        statements = null;
        dataFile = null;
        initialized = false;
      }
      finally {
        stLock.release();
      }
    }
  }

  /**
 
View Full Code Here

              Lock stLock = getStatementsReadLock();
              try {
                sync();
              }
              finally {
                stLock.release();
              }
            }
            catch (SailException e) {
              logger.warn("Unable to sync on timer", e);
            }
View Full Code Here

      }

      currentSnapshot = 1;
    }
    finally {
      stLock.release();
    }
  }

  protected void scheduleSnapshotCleanup() {
    synchronized (snapshotCleanupThreadSemaphore) {
View Full Code Here

    }
    finally {
      // Release the exclusive lock. Any threads waiting to obtain a
      // non-exclusive read lock will get one and then fail with an
      // IllegalStateException, because the connection is no longer open.
      conLock.release();
    }
  }

  public final CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(
      TupleExpr tupleExpr, Dataset dataset, BindingSet bindings, boolean includeInferred)
View Full Code Here

    try {
      verifyIsOpen();
      return registerIteration(evaluateInternal(tupleExpr, dataset, bindings, includeInferred));
    }
    finally {
      conLock.release();
    }
  }

  public final CloseableIteration<? extends Resource, SailException> getContextIDs()
    throws SailException
View Full Code Here

    try {
      verifyIsOpen();
      return registerIteration(getContextIDsInternal());
    }
    finally {
      conLock.release();
    }
  }

  public final CloseableIteration<? extends Statement, SailException> getStatements(Resource subj, URI pred,
      Value obj, boolean includeInferred, Resource... contexts)
View Full Code Here

    try {
      verifyIsOpen();
      return registerIteration(getStatementsInternal(subj, pred, obj, includeInferred, contexts));
    }
    finally {
      conLock.release();
    }
  }

  public final long size(Resource... contexts)
    throws SailException
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.