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, toString
public BigdataSailRepository(BigdataSail sail)
public BigdataSail getSail()
getSail
in class org.openrdf.repository.sail.SailRepository
public 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.Repository
getConnection
in class org.openrdf.repository.sail.SailRepository
org.openrdf.repository.RepositoryException
BigdataSail.getConnection()
,
getUnisolatedConnection()
public BigdataSailRepositoryConnection getReadOnlyConnection() throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryException
BigdataSail.getReadOnlyConnection()
public BigdataSailRepositoryConnection getReadOnlyConnection(long timestamp) throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryException
BigdataSail.getReadOnlyConnection(long)
public BigdataSailRepositoryConnection getReadWriteConnection() throws org.openrdf.repository.RepositoryException, InterruptedException
InterruptedException
org.openrdf.repository.RepositoryException
BigdataSail.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.RepositoryException
BigdataSail.getUnisolatedConnection()
,
getConnection()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.