public class FedXRepository extends SailRepository
SailRepository
which performs the actions as defined in FedXRepositoryConnection
.logger
Constructor and Description |
---|
FedXRepository(FedX federation,
FedXConfig config) |
Modifier and Type | Method and Description |
---|---|
FedXRepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and updating the contents of the repository.
|
FederationContext |
getFederationContext() |
String |
getFederationSize()
return the number of triples in the federation as string.
|
QueryManager |
getQueryManager() |
protected void |
initializeInternal() |
void |
setFederatedServiceResolver(FederatedServiceResolver resolver)
Sets the
FederatedServiceResolver to use for this client. |
protected void |
shutDownInternal() |
getDataDir, getHttpClient, getHttpClientSessionManager, getSail, getValueFactory, isWritable, setDataDir, setHttpClient, setHttpClientSessionManager, setRepositoryResolver, toString
init, initialize, isInitialized, shutDown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSesameClient, setSesameClient
public FedXRepository(FedX federation, FedXConfig config)
public FedXRepositoryConnection getConnection() throws RepositoryException
Repository
try (RepositoryConnection conn = repository.getConnection()) { // perform operations on the connection }Note that
RepositoryConnection
is not guaranteed to be thread-safe! The recommended pattern for
repository access in a multi-threaded application is to share the Repository object between threads, but have
each thread create and use its own RepositoryConnection
s.getConnection
in interface Repository
getConnection
in class SailRepository
RepositoryException
- If something went wrong during the creation of the Connection.protected void initializeInternal() throws RepositoryException
initializeInternal
in class SailRepository
RepositoryException
protected void shutDownInternal() throws RepositoryException
shutDownInternal
in class SailRepository
RepositoryException
public void setFederatedServiceResolver(FederatedServiceResolver resolver)
FederatedServiceResolverClient
FederatedServiceResolver
to use for this client.setFederatedServiceResolver
in interface FederatedServiceResolverClient
setFederatedServiceResolver
in class SailRepository
resolver
- The resolver to use.public String getFederationSize()
EndpointType.NativeStore
and EndpointType.RemoteRepository
.
If the federation contains other types of endpoints, the size is indicated as a lower bound, i.e. the string
starts with a larger sign.public FederationContext getFederationContext()
FederationContext
public QueryManager getQueryManager()
QueryManager
from the FederationContext
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.