Package org.openrdf.sail

Examples of org.openrdf.sail.SailException


      iter = strategy.evaluate(tupleExpr, bindings);
      return new LockingIteration<BindingSet, QueryEvaluationException>(stLock, iter);
    }
    catch (QueryEvaluationException e) {
      stLock.release();
      throw new SailException(e);
    }
    catch (RuntimeException e) {
      stLock.release();
      throw e;
    }
View Full Code Here


  @Override
  protected void startTransactionInternal()
    throws SailException
  {
    if (!store.isWritable()) {
      throw new SailException("Unable to start transaction: data file is read-only");
    }

    txnStLock = store.getStatementsReadLock();

    // Prevent concurrent transactions by acquiring an exclusive txn lock
View Full Code Here

    // FIXME: changes to namespace prefixes not isolated in transactions yet
    try {
      store.getNamespaceStore().setNamespace(prefix, name);
    }
    catch (IllegalArgumentException e) {
      throw new SailException(e.getMessage());
    }
  }
View Full Code Here

      InferencerConnection con = (InferencerConnection)super.getConnection();
      this.con = new SameAsInferencerConnection(con);
      return this.con;
    }
    catch (ClassCastException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

    // Check initialization parameters
    File dataDir = getDataDir();

    if (dataDir == null) {
      throw new SailException("Data dir has not been set");
    }
    else if (!dataDir.exists()) {
      boolean success = dataDir.mkdirs();
      if (!success) {
        throw new SailException("Unable to create data directory: " + dataDir);
      }
    }
    else if (!dataDir.isDirectory()) {
      throw new SailException("The specified path does not denote a directory: " + dataDir);
    }
    else if (!dataDir.canRead()) {
      throw new SailException("Not allowed to read from the specified directory: " + dataDir);
    }

    logger.debug("Data dir is " + dataDir);

    try {
      namespaceStore = new NamespaceStore(dataDir);
      valueStore = new ValueStore(dataDir, forceSync);
      tripleStore = new TripleStore(dataDir, tripleIndexes, forceSync);
    }
    catch (IOException e) {
      throw new SailException(e);
    }

    initialized = true;
    logger.debug("NativeStore initialized");
  }
View Full Code Here

          initialized = false;

          logger.debug("NativeStore shut down");
        }
        catch (IOException e) {
          throw new SailException(e);
        }
        finally {
          writeLock.release();
        }
      }
View Full Code Here

    try {
      return new NativeStoreConnection(this);
    }
    catch (IOException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

  {
    try {
      return storeLockManager.getReadLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

  {
    try {
      return storeLockManager.getWriteLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

  {
    try {
      return txnLockManager.getExclusiveLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.openrdf.sail.SailException

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.