Package info.aduna.concurrent.locks

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


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


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

      Lock txnLock = getTransactionLock();
      try {
        getDelegate().flushUpdates();
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
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

    }
    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();
    }
  }

  @Override
  public Cursor<? extends BindingSet> evaluate(QueryModel query, BindingSet bindings, boolean includeInferred)
View Full Code Here

    Lock conLock = getSharedConnectionLock();
    try {
      return super.evaluate(query, bindings, includeInferred);
    }
    finally {
      conLock.release();
    }
  }

  @Override
  public Cursor<? extends Resource> getContextIDs()
View Full Code Here

    Lock conLock = getSharedConnectionLock();
    try {
      return super.getContextIDs();
    }
    finally {
      conLock.release();
    }
  }

  @Override
  public Cursor<? extends Statement> getStatements(Resource subj, URI pred, Value obj,
View Full Code Here

    Lock conLock = getSharedConnectionLock();
    try {
      return super.getStatements(subj, pred, obj, includeInferred, contexts);
    }
    finally {
      conLock.release();
    }
  }

  @Override
  public long size(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts)
View Full Code Here

    Lock conLock = getSharedConnectionLock();
    try {
      return super.size(subj, pred, obj, includeInferred, contexts);
    }
    finally {
      conLock.release();
    }
  }

  @Override
  public void commit()
View Full Code Here

      Lock txnLock = getTransactionLock();
      try {
        super.commit();
      }
      finally {
        txnLock.release();
      }
    }
    finally {
      conLock.release();
    }
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.