public class BigdataSailRemoteRepository extends Object implements org.openrdf.repository.Repository
Repository
that wraps
the blazegraph remote API. Additional functionality is available using the
blazegraph RemoteRepositoryManager
. The proper incantation to create
an instance of this class is:
// Create client for the remote service. final RemoteRepositoryManager mgr = new RemoteRepositoryManager(serviceURL); try { // Obtain a Sesame Repository for the default sparql endpoint on that // service. final Repository repo = mgr.getRepositoryForDefaultNamespace() .getBigdataSailRemoteRepository(); try { doWork(repo); } finally { repo.close(); } } finally { mgr.close(); }This pattern makes it possible to:
BigdataSailRemoteRepository
objects for different sparql
end points on the same blazegraph server.BigdataSailRemoteRepository
objects are flyweight.RemoteRepositoryManager
can be used to access additional
interfaces, including the multi-tenancy API and the transaction API.Repository
or
RepositoryConnection
. Therefore a namespace DOES NOT need to be
configured for isolatable indices in order to create and manipulate
transactions, but it DOES need to be configured with isolatable indices in
order for you to WRITE on the namespace using a transaction.Constructor and Description |
---|
BigdataSailRemoteRepository(RemoteRepository repo)
Flyweight constructor wraps the blazegraph remote client for a SPARQL
endpoint as an openrdf
Repository . |
BigdataSailRemoteRepository(String sparqlEndpointURL)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel(UUID queryId)
Cancel the query specified by the UUID.
|
BigdataSailRemoteRepositoryConnection |
getConnection() |
File |
getDataDir()
Unsupported operation
|
RemoteRepository |
getRemoteRepository()
The object used to communicate with that remote repository.
|
org.openrdf.model.ValueFactory |
getValueFactory()
Return a client-only
ValueFactory implementation. |
void |
initialize() |
boolean |
isInitialized() |
boolean |
isWritable() |
void |
setDataDir(File dataDir)
Unsupported operation
|
Collection<RunningQuery> |
showQueries()
Return a collection containing Metadata objects about the
currently running queries.
|
void |
shutDown() |
@Deprecated public BigdataSailRemoteRepository(String sparqlEndpointURL)
RemoteRepositoryManager
that is scoped to the life
cycle of this class. The allocated RemoteRepositoryManager
will be
closed when this BigdataSailRemoteRepository
is closed.
Note: This constructor pattern is NOT flyweight.
sparqlEndpointURL
- The SPARQL end point URLpublic BigdataSailRemoteRepository(RemoteRepository repo)
Repository
.public RemoteRepository getRemoteRepository()
public void shutDown() throws org.openrdf.repository.RepositoryException
shutDown
in interface org.openrdf.repository.Repository
org.openrdf.repository.RepositoryException
public BigdataSailRemoteRepositoryConnection getConnection() throws org.openrdf.repository.RepositoryException
getConnection
in interface org.openrdf.repository.Repository
org.openrdf.repository.RepositoryException
public void initialize() throws org.openrdf.repository.RepositoryException
initialize
in interface org.openrdf.repository.Repository
org.openrdf.repository.RepositoryException
public boolean isInitialized()
isInitialized
in interface org.openrdf.repository.Repository
public boolean isWritable() throws org.openrdf.repository.RepositoryException
isWritable
in interface org.openrdf.repository.Repository
org.openrdf.repository.RepositoryException
public void setDataDir(File dataDir)
setDataDir
in interface org.openrdf.repository.Repository
UnsupportedOperationException
public File getDataDir()
getDataDir
in interface org.openrdf.repository.Repository
UnsupportedOperationException
public org.openrdf.model.ValueFactory getValueFactory()
ValueFactory
implementation.getValueFactory
in interface org.openrdf.repository.Repository
public void cancel(UUID queryId) throws Exception
queryId
- Exception
public Collection<RunningQuery> showQueries() throws Exception
Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.