public class Federation extends Object implements Sail, Executor, FederatedServiceResolverClient, RepositoryResolverClient, HttpClientDependent, SessionManagerDependent
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. |
protected Map<Repository,RepositoryBloomFilter> |
getBloomFilters()
Returns the configured
RepositoryBloomFilter s (if any). |
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. |
HttpClientSessionManager |
getHttpClientSessionManager()
HttpClientSessionManager that has been assigned or has been used by this object. |
PrefixHashSet |
getLocalPropertySpace() |
protected List<Repository> |
getMembers()
Returns the members of this federation.
|
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 IRI-, blank node-, literal- and statement objects.
|
void |
init()
Initializes the Sail.
|
void |
initialize()
Deprecated.
|
boolean |
isDistinct() |
boolean |
isReadOnly() |
boolean |
isWritable()
Checks whether this Sail object is writable, i.e.
|
void |
setBloomFilter(Repository member,
RepositoryBloomFilter filter)
Sets an optional
RepositoryBloomFilter to use with the given Repository . |
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 |
setHttpClientSessionManager(HttpClientSessionManager client)
Assign an
HttpClientSessionManager that this object should use. |
void |
setLocalPropertySpace(Collection<String> localPropertySpace) |
void |
setReadOnly(boolean readOnly) |
void |
setRepositoryResolver(RepositoryResolver resolver) |
void |
shutDown()
Shuts down the Sail, giving it the opportunity to synchronize any stale data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSesameClient, setSesameClient
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)
protected List<Repository> getMembers()
public void setBloomFilter(Repository member, RepositoryBloomFilter filter)
RepositoryBloomFilter
to use with the given Repository
.filter
- the filter to use or null to not use a filter.protected Map<Repository,RepositoryBloomFilter> getBloomFilters()
RepositoryBloomFilter
s (if any).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 HttpClientSessionManager getHttpClientSessionManager()
SessionManagerDependent
HttpClientSessionManager
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 HttpClientSessionManager
was passed to or
created by this object respectively.getHttpClientSessionManager
in interface SesameClientDependent
getHttpClientSessionManager
in interface SessionManagerDependent
HttpClientSessionManager
instance or nullpublic void setHttpClientSessionManager(HttpClientSessionManager client)
SessionManagerDependent
HttpClientSessionManager
that this object should use. The life cycle of the given
HttpClientSessionManager
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.setHttpClientSessionManager
in interface SesameClientDependent
setHttpClientSessionManager
in interface SessionManagerDependent
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
@Deprecated public void initialize() throws SailException
Sail
initialize
in interface Sail
SailException
- If the Sail could not be initialized.public void init() throws SailException
Sail
init
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.protected EvaluationStrategy createEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver resolver)
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 © 2015-2019 Eclipse Foundation. All Rights Reserved.