Package info.aduna.concurrent.locks

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


        dataFile = null;
        syncFile = null;
        initialized = false;
      }
      finally {
        stLock.release();
        if (dirLock != null) {
          dirLock.release();
        }
      }
    }
View Full Code Here


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

      }

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

    // long endTime = System.currentTimeMillis();
    // System.out.println("cleanSnapshots() took " + (endTime - startTime) +
    // " ms");
View Full Code Here

      vf.flush();
      statements.committed(writeLock != null);
    }
    finally {
      if (writeLock != null) {
        writeLock.release();
      }
    }
  }

  public void rollback()
View Full Code Here

      iter = strategy.evaluate(query, EmptyBindingSet.getInstance());
      iter = new LockingCursor<BindingSet>(readLock, iter);
      return iter;
    }
    catch (EvaluationException e) {
      readLock.release();
      throw e;
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
View Full Code Here

    catch (EvaluationException e) {
      readLock.release();
      throw e;
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
  }

  protected void replaceValues(TupleExpr tupleExpr)
View Full Code Here

      contextIter = new LockingCursor<Resource>(readLock, contextIter);

      return contextIter;
    }
    catch (IOException e) {
      readLock.release();
      throw new StoreException(e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
View Full Code Here

    catch (IOException e) {
      readLock.release();
      throw new StoreException(e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
  }

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

      iter = new LockingCursor<Statement>(readLock, iter);

      return iter;
    }
    catch (IOException e) {
      readLock.release();
      throw new StoreException("Unable to get statements", e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
View Full Code Here

    catch (IOException e) {
      readLock.release();
      throw new StoreException("Unable to get statements", e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
  }

  public long size(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts)
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.