public class BigdataSailRepository
extends org.openrdf.repository.sail.SailRepository
SailRepository implementation class.BigdataSailRepositoryConnection| Constructor and Description |
|---|
BigdataSailRepository(BigdataSail sail) |
| Modifier and Type | Method and Description |
|---|---|
BigdataSailRepositoryConnection |
getConnection() |
BigdataSailRepositoryConnection |
getReadOnlyConnection()
Obtain a read-only connection to the database at the last commit point.
|
BigdataSailRepositoryConnection |
getReadOnlyConnection(long timestamp)
Obtain a read-only connection to the database from a historical commit
point.
|
BigdataSailRepositoryConnection |
getReadWriteConnection()
Return a connection backed by a read-write transaction.
|
BigdataSail |
getSail() |
BigdataSailRepositoryConnection |
getUnisolatedConnection()
Return an unisolated connection to the database.
|
getDataDir, getValueFactory, initializeInternal, isWritable, setDataDir, shutDownInternal, toStringpublic BigdataSailRepository(BigdataSail sail)
public BigdataSail getSail()
getSail in class org.openrdf.repository.sail.SailRepositorypublic BigdataSailRepositoryConnection getConnection() throws org.openrdf.repository.RepositoryException
The correct pattern for obtaining an updatable connection, doing work with that connection, and committing or rolling back that update is as follows.
BigdataSailConnection conn = null;
boolean ok = false;
try {
conn = repo.getConnection();
doWork(conn);
conn.commit();
ok = true;
} finally {
if (conn != null) {
if (!ok) {
conn.rollback();
}
conn.close();
}
}
getConnection in interface org.openrdf.repository.RepositorygetConnection in class org.openrdf.repository.sail.SailRepositoryorg.openrdf.repository.RepositoryExceptionBigdataSail.getConnection(),
getUnisolatedConnection()public BigdataSailRepositoryConnection getReadOnlyConnection() throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryExceptionBigdataSail.getReadOnlyConnection()public BigdataSailRepositoryConnection getReadOnlyConnection(long timestamp) throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryExceptionBigdataSail.getReadOnlyConnection(long)public BigdataSailRepositoryConnection getReadWriteConnection() throws org.openrdf.repository.RepositoryException, InterruptedException
InterruptedExceptionorg.openrdf.repository.RepositoryExceptionBigdataSail.getReadWriteConnection()public BigdataSailRepositoryConnection getUnisolatedConnection() throws org.openrdf.repository.RepositoryException
The correct pattern for obtaining an updatable connection, doing work with that connection, and committing or rolling back that update is as follows.
BigdataSailConnection conn = null;
boolean ok = false;
try {
conn = repo.getConnection();
doWork(conn);
conn.commit();
ok = true;
} finally {
if (conn != null) {
if (!ok) {
conn.rollback();
}
conn.close();
}
}
org.openrdf.repository.RepositoryExceptionBigdataSail.getUnisolatedConnection(),
getConnection()Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.