Package info.aduna.concurrent.locks

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


          }
        }
      }
    }
    finally {
      stLock.release();
    }

    return new CollectionCursor<MemResource>(contextIDs);
  }
View Full Code Here


      return new LockingCursor<MemStatement>(stLock, store.createStatementIterator(subj, pred, obj,
          !includeInferred, snapshot, readMode, vf, contexts));
    }
    catch (RuntimeException e) {
      stLock.release();
      throw e;
    }
  }

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

      finally {
        iter.close();
      }
    }
    finally {
      stLock.release();
    }
  }

  public Cursor<? extends Namespace> getNamespaces()
    throws StoreException
View Full Code Here

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

  public Cursor<? extends Namespace> getNamespaces()
    throws StoreException
View Full Code Here

    try {
      return new LockingCursor<NamespaceImpl>(readLock, new CollectionCursor<NamespaceImpl>(
          nativeStore.getNamespaceStore()));
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
  }

  public String getNamespace(String prefix)
View Full Code Here

    Lock readLock = nativeStore.getReadLock();
    try {
      return nativeStore.getNamespaceStore().getNamespace(prefix);
    }
    finally {
      readLock.release();
    }
  }

  @Override
  public void begin()
View Full Code Here

    catch (RuntimeException e) {
      logger.error("Encountered an unexpected problem while trying to commit", e);
      throw e;
    }
    finally {
      storeReadLock.release();
    }

    nativeStore.notifySailChanged(sailChangedEvent);

    // create a fresh event object.
View Full Code Here

      logger.error("Encountered an unexpected problem while trying to roll back", e);
      throw e;
    }
    finally {
      txnLock.release();
      storeReadLock.release();
    }
  }

  public void addStatement(Resource subj, URI pred, Value obj, Resource... contexts)
    throws StoreException
View Full Code Here

        }

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

        }
        catch (IOException e) {
          throw new StoreException(e);
        }
        finally {
          writeLock.release();
        }
      }
      finally {
        txnLock.release();
        dirLock.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.