Package info.aduna.concurrent.locks

Examples of info.aduna.concurrent.locks.Lock


  }

  public final CloseableIteration<? extends Resource, SailException> getContextIDs()
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();
      return registerIteration(getContextIDsInternal());
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here


  public final CloseableIteration<? extends Statement, SailException> getStatements(Resource subj, URI pred,
      Value obj, boolean includeInferred, Resource... contexts)
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();
      return registerIteration(getStatementsInternal(subj, pred, obj, includeInferred, contexts));
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here

  }

  public final long size(Resource... contexts)
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();
      return sizeInternal(contexts);
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here

  }

  public final void commit()
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();

      Lock txnLock = getTransactionLock();
      try {
        if (txnActive) {
          commitInternal();
          txnActive = false;
        }
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

  }

  public final void rollback()
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();

      Lock txnLock = getTransactionLock();
      try {
        if (txnActive) {
          try {
            rollbackInternal();
          }
          finally {
            txnActive = false;
          }
        }
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

  }

  public final void addStatement(Resource subj, URI pred, Value obj, Resource... contexts)
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();

      Lock txnLock = getTransactionLock();
      try {
        autoStartTransaction();
        addStatementInternal(subj, pred, obj, contexts);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

  }

  public final void removeStatements(Resource subj, URI pred, Value obj, Resource... contexts)
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();

      Lock txnLock = getTransactionLock();
      try {
        autoStartTransaction();
        removeStatementsInternal(subj, pred, obj, contexts);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

  }

  public final void clear(Resource... contexts)
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();

      Lock txnLock = getTransactionLock();
      try {
        autoStartTransaction();
        clearInternal(contexts);
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
View Full Code Here

  }

  public final CloseableIteration<? extends Namespace, SailException> getNamespaces()
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();
      return registerIteration(getNamespacesInternal());
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here

  }

  public final String getNamespace(String prefix)
    throws SailException
  {
    Lock conLock = getSharedConnectionLock();
    try {
      verifyIsOpen();
      return getNamespaceInternal(prefix);
    }
    finally {
      conLock.release();
    }
  }
View Full Code Here

TOP

Related Classes of info.aduna.concurrent.locks.Lock

Copyright © 2018 www.massapicom. 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.