public class Federation extends Object implements Sail, Executor, FederatedServiceResolverClient, RepositoryResolverClient, HttpClientDependent, SesameClientDependent
| Constructor and Description |
|---|
Federation() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(Repository member) |
protected EvaluationStrategy |
createEvaluationStrategy(TripleSource tripleSource,
Dataset dataset,
FederatedServiceResolver resolver) |
void |
execute(Runnable command)
Required by
Executor interface. |
SailConnection |
getConnection()
Opens a connection on the Sail which can be used to query and update data.
|
File |
getDataDir()
Gets the Sail's data directory.
|
IsolationLevel |
getDefaultIsolationLevel()
Retrieves the default
IsolationLevel level on which transactions
in this Sail operate. |
FederatedServiceResolver |
getFederatedServiceResolver() |
org.apache.http.client.HttpClient |
getHttpClient()
HttpClient that has been assigned or has been used by this object. |
PrefixHashSet |
getLocalPropertySpace() |
SesameClient |
getSesameClient()
SesameClient that has been assigned or has been used by this
object. |
List<IsolationLevel> |
getSupportedIsolationLevels()
Retrieve the
IsolationLevels supported by this SAIL, ordered by
increasing complexity. |
ValueFactory |
getValueFactory()
Gets a ValueFactory object that can be used to create URI-, blank node-,
literal- and statement objects.
|
void |
initialize()
Initializes the Sail.
|
boolean |
isDistinct() |
boolean |
isReadOnly() |
boolean |
isWritable()
Checks whether this Sail object is writable, i.e.
|
void |
setDataDir(File dataDir)
Sets the data directory for the Sail.
|
void |
setDistinct(boolean distinct) |
void |
setFederatedServiceResolver(FederatedServiceResolver resolver)
Overrides the
FederatedServiceResolver used by this instance, but
the given resolver is not shutDown when this instance is. |
void |
setHttpClient(org.apache.http.client.HttpClient client)
Assign an
HttpClient that this object should use. |
void |
setLocalPropertySpace(Collection<String> localPropertySpace) |
void |
setReadOnly(boolean readOnly) |
void |
setRepositoryResolver(RepositoryResolver resolver) |
void |
setSesameClient(SesameClient client)
Assign an
SesameClient that this object should use. |
void |
shutDown()
Shuts down the Sail, giving it the opportunity to synchronize any stale
data.
|
public File getDataDir()
SailgetDataDir in interface SailSail.setDataDir(File)public void setDataDir(File dataDir)
Sailinitialized.setDataDir in interface Sailpublic ValueFactory getValueFactory()
SailgetValueFactory in interface Sailpublic boolean isWritable()
throws SailException
SailisWritable in interface SailSailExceptionpublic void addMember(Repository member)
public PrefixHashSet getLocalPropertySpace()
public void setLocalPropertySpace(Collection<String> localPropertySpace)
public boolean isDistinct()
public void setDistinct(boolean distinct)
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public FederatedServiceResolver getFederatedServiceResolver()
public void setFederatedServiceResolver(FederatedServiceResolver resolver)
FederatedServiceResolver used by this instance, but
the given resolver is not shutDown when this instance is.setFederatedServiceResolver in interface FederatedServiceResolverClientreslover - The SERVICE resolver to set.public void setRepositoryResolver(RepositoryResolver resolver)
setRepositoryResolver in interface RepositoryResolverClientpublic SesameClient getSesameClient()
SesameClientDependentSesameClient that has been assigned or has been used by this
object. The life cycle might not be or might be tied to this object,
depending on whether SesameClient was passed to or created by this
object respectively.getSesameClient in interface SesameClientDependentSesameClient instance or nullpublic void setSesameClient(SesameClient client)
SesameClientDependentSesameClient that this object should use. The life cycle
of the given SesameClient is independent of this object. Closing
or shutting down this object does not have any impact on the given client.
Callers must ensure that the given client is properly closed elsewhere.setSesameClient in interface SesameClientDependentpublic org.apache.http.client.HttpClient getHttpClient()
HttpClientDependentHttpClient that has been assigned or has been used by this object.
The life cycle might not be or might be tied to this object, depending on
whether HttpClient was passed to or created by this object
respectively.getHttpClient in interface HttpClientDependentHttpClient instance or nullpublic void setHttpClient(org.apache.http.client.HttpClient client)
HttpClientDependentHttpClient that this object should use. The life cycle
of the given HttpClient is independent of this object. Closing or
shutting down this object does not have any impact on the given client.
Callers must ensure that the given client is properly closed elsewhere.setHttpClient in interface HttpClientDependentpublic void initialize()
throws SailException
Sailinitialize in interface SailSailException - If the Sail could not be initialized.public void shutDown()
throws SailException
SailshutDown in interface SailSailException - If the Sail object encountered an error or unexpected situation
internally.public SailConnection getConnection() throws SailException
SailgetConnection in interface SailSailException - If no transaction could be started, for example because the Sail
is not writable.protected EvaluationStrategy createEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver resolver)
public List<IsolationLevel> getSupportedIsolationLevels()
SailIsolationLevels supported by this SAIL, ordered by
increasing complexity.getSupportedIsolationLevels in interface SailIsolationLevel.public IsolationLevel getDefaultIsolationLevel()
SailIsolationLevel level on which transactions
in this Sail operate.getDefaultIsolationLevel in interface SailIsolationLevel that will be used with
SailConnection.begin(), for SAIL connections returned by
Sail.getConnection().Copyright © 2001–2015 Aduna. All rights reserved.