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) |
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
IsolationLevel s 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()
Sail
getDataDir
in interface Sail
Sail.setDataDir(File)
public void setDataDir(File dataDir)
Sail
initialized
.setDataDir
in interface Sail
public ValueFactory getValueFactory()
Sail
getValueFactory
in interface Sail
public boolean isWritable() throws SailException
Sail
isWritable
in interface Sail
SailException
public 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 FederatedServiceResolverClient
reslover
- The SERVICE resolver to set.public void setRepositoryResolver(RepositoryResolver resolver)
setRepositoryResolver
in interface RepositoryResolverClient
public SesameClient getSesameClient()
SesameClientDependent
SesameClient
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 SesameClientDependent
SesameClient
instance or nullpublic void setSesameClient(SesameClient client)
SesameClientDependent
SesameClient
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 SesameClientDependent
public org.apache.http.client.HttpClient getHttpClient()
HttpClientDependent
HttpClient
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 HttpClientDependent
HttpClient
instance or nullpublic void setHttpClient(org.apache.http.client.HttpClient client)
HttpClientDependent
HttpClient
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 HttpClientDependent
public void initialize() throws SailException
Sail
initialize
in interface Sail
SailException
- If the Sail could not be initialized.public void shutDown() throws SailException
Sail
shutDown
in interface Sail
SailException
- If the Sail object encountered an error or unexpected situation
internally.public SailConnection getConnection() throws SailException
Sail
getConnection
in interface Sail
SailException
- If no transaction could be started, for example because the Sail
is not writable.public List<IsolationLevel> getSupportedIsolationLevels()
Sail
IsolationLevel
s supported by this SAIL, ordered by
increasing complexity.getSupportedIsolationLevels
in interface Sail
IsolationLevel
.public IsolationLevel getDefaultIsolationLevel()
Sail
IsolationLevel
level on which transactions
in this Sail operate.getDefaultIsolationLevel
in interface Sail
IsolationLevel
that will be used with
SailConnection.begin()
, for SAIL connections returned by
Sail.getConnection()
.Copyright © 2001-2016 Aduna. All Rights Reserved.