Class Federation
- java.lang.Object
-
- org.eclipse.rdf4j.sail.federation.Federation
-
- All Implemented Interfaces:
Executor
,HttpClientDependent
,SesameClientDependent
,SessionManagerDependent
,FederatedServiceResolverClient
,RepositoryResolverClient
,Sail
@Deprecated public class Federation extends Object implements Sail, Executor, FederatedServiceResolverClient, RepositoryResolverClient, HttpClientDependent, SessionManagerDependent
Deprecated.since 3.1.0. This module will be replaced by the new FedX federation module.Union multiple (possibly remote) Repositories into a single RDF store.- Author:
- James Leigh, Arjohn Kampman
-
-
Constructor Summary
Constructors Constructor Description Federation()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addMember(Repository member)
Deprecated.protected EvaluationStrategy
createEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver resolver)
Deprecated.void
execute(Runnable command)
Deprecated.Required byExecutor
interface.protected Map<Repository,RepositoryBloomFilter>
getBloomFilters()
Deprecated.Returns the configuredRepositoryBloomFilter
s (if any).SailConnection
getConnection()
Deprecated.Opens a connection on the Sail which can be used to query and update data.File
getDataDir()
Deprecated.Gets the Sail's data directory.IsolationLevel
getDefaultIsolationLevel()
Deprecated.Retrieves the defaultIsolationLevel
level on which transactions in this Sail operate.FederatedServiceResolver
getFederatedServiceResolver()
Deprecated.org.apache.http.client.HttpClient
getHttpClient()
Deprecated.HttpClient
that has been assigned or has been used by this object.HttpClientSessionManager
getHttpClientSessionManager()
Deprecated.HttpClientSessionManager
that has been assigned or has been used by this object.PrefixHashSet
getLocalPropertySpace()
Deprecated.protected List<Repository>
getMembers()
Deprecated.Returns the members of this federation.List<IsolationLevel>
getSupportedIsolationLevels()
Deprecated.Retrieve theIsolationLevel
s supported by this SAIL, ordered by increasing complexity.ValueFactory
getValueFactory()
Deprecated.Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.void
init()
Deprecated.Initializes the Sail.void
initialize()
Deprecated.boolean
isDistinct()
Deprecated.boolean
isReadOnly()
Deprecated.boolean
isWritable()
Deprecated.Checks whether this Sail object is writable, i.e.void
setBloomFilter(Repository member, RepositoryBloomFilter filter)
Deprecated.Sets an optionalRepositoryBloomFilter
to use with the givenRepository
.void
setDataDir(File dataDir)
Deprecated.Sets the data directory for the Sail.void
setDistinct(boolean distinct)
Deprecated.void
setFederatedServiceResolver(FederatedServiceResolver resolver)
Deprecated.Overrides theFederatedServiceResolver
used by this instance, but the given resolver is not shutDown when this instance is.void
setHttpClient(org.apache.http.client.HttpClient client)
Deprecated.Assign anHttpClient
that this object should use.void
setHttpClientSessionManager(HttpClientSessionManager client)
Deprecated.Assign anHttpClientSessionManager
that this object should use.void
setLocalPropertySpace(Collection<String> localPropertySpace)
Deprecated.void
setReadOnly(boolean readOnly)
Deprecated.void
setRepositoryResolver(RepositoryResolver resolver)
Deprecated.void
shutDown()
Deprecated.Shuts down the Sail, giving it the opportunity to synchronize any stale data.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.http.client.SesameClientDependent
getSesameClient, setSesameClient
-
-
-
-
Method Detail
-
getDataDir
public File getDataDir()
Deprecated.Description copied from interface:Sail
Gets the Sail's data directory.- Specified by:
getDataDir
in interfaceSail
- See Also:
Sail.setDataDir(File)
-
setDataDir
public void setDataDir(File dataDir)
Deprecated.Description copied from interface:Sail
Sets the data directory for the Sail. The Sail can use this directory for storage of data, parameters, etc. This directory must be set before the Sail isinitialized
.- Specified by:
setDataDir
in interfaceSail
-
getValueFactory
public ValueFactory getValueFactory()
Deprecated.Description copied from interface:Sail
Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.- Specified by:
getValueFactory
in interfaceSail
- Returns:
- a ValueFactory object for this Sail object.
-
isWritable
public boolean isWritable() throws SailException
Deprecated.Description copied from interface:Sail
Checks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.- Specified by:
isWritable
in interfaceSail
- Throws:
SailException
-
addMember
public void addMember(Repository member)
Deprecated.
-
getMembers
protected List<Repository> getMembers()
Deprecated.Returns the members of this federation.- Returns:
- unmodifiable list of federation members.
-
setBloomFilter
public void setBloomFilter(Repository member, RepositoryBloomFilter filter)
Deprecated.Sets an optionalRepositoryBloomFilter
to use with the givenRepository
.- Parameters:
filter
- the filter to use or null to not use a filter.
-
getBloomFilters
protected Map<Repository,RepositoryBloomFilter> getBloomFilters()
Deprecated.Returns the configuredRepositoryBloomFilter
s (if any).- Returns:
- unmodifiable map of repositories to bloom filters.
-
getLocalPropertySpace
public PrefixHashSet getLocalPropertySpace()
Deprecated.- Returns:
- PrefixHashSet or null
-
setLocalPropertySpace
public void setLocalPropertySpace(Collection<String> localPropertySpace)
Deprecated.
-
isDistinct
public boolean isDistinct()
Deprecated.
-
setDistinct
public void setDistinct(boolean distinct)
Deprecated.
-
isReadOnly
public boolean isReadOnly()
Deprecated.
-
setReadOnly
public void setReadOnly(boolean readOnly)
Deprecated.
-
getFederatedServiceResolver
public FederatedServiceResolver getFederatedServiceResolver()
Deprecated.- Returns:
- Returns the SERVICE resolver.
-
setFederatedServiceResolver
public void setFederatedServiceResolver(FederatedServiceResolver resolver)
Deprecated.Overrides theFederatedServiceResolver
used by this instance, but the given resolver is not shutDown when this instance is.- Specified by:
setFederatedServiceResolver
in interfaceFederatedServiceResolverClient
- Parameters:
resolver
- The SERVICE resolver to set.
-
setRepositoryResolver
public void setRepositoryResolver(RepositoryResolver resolver)
Deprecated.- Specified by:
setRepositoryResolver
in interfaceRepositoryResolverClient
-
getHttpClientSessionManager
public HttpClientSessionManager getHttpClientSessionManager()
Deprecated.Description copied from interface: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 whetherHttpClientSessionManager
was passed to or created by this object respectively.- Specified by:
getHttpClientSessionManager
in interfaceSesameClientDependent
- Specified by:
getHttpClientSessionManager
in interfaceSessionManagerDependent
- Returns:
- a
HttpClientSessionManager
instance or null
-
setHttpClientSessionManager
public void setHttpClientSessionManager(HttpClientSessionManager client)
Deprecated.Description copied from interface:SessionManagerDependent
Assign anHttpClientSessionManager
that this object should use. The life cycle of the givenHttpClientSessionManager
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.- Specified by:
setHttpClientSessionManager
in interfaceSesameClientDependent
- Specified by:
setHttpClientSessionManager
in interfaceSessionManagerDependent
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()
Deprecated.Description copied from interface: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 whetherHttpClient
was passed to or created by this object respectively.- Specified by:
getHttpClient
in interfaceHttpClientDependent
- Returns:
- an
HttpClient
instance or null
-
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient client)
Deprecated.Description copied from interface:HttpClientDependent
Assign anHttpClient
that this object should use. The life cycle of the givenHttpClient
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.- Specified by:
setHttpClient
in interfaceHttpClientDependent
-
initialize
@Deprecated public void initialize() throws SailException
Deprecated.Description copied from interface:Sail
Initializes the Sail. Care should be taken that required initialization parameters have been set before this method is called. Please consult the specific Sail implementation for information about the relevant parameters.- Specified by:
initialize
in interfaceSail
- Throws:
SailException
- If the Sail could not be initialized.
-
init
public void init() throws SailException
Deprecated.Description copied from interface:Sail
Initializes the Sail. Care should be taken that required initialization parameters have been set before this method is called. Please consult the specific Sail implementation for information about the relevant parameters.- Specified by:
init
in interfaceSail
- Throws:
SailException
- If the Sail could not be initialized.
-
shutDown
public void shutDown() throws SailException
Deprecated.Description copied from interface:Sail
Shuts down the Sail, giving it the opportunity to synchronize any stale data. Care should be taken that all initialized Sails are being shut down before an application exits to avoid potential loss of data. Once shut down, a Sail can no longer be used until it is re-initialized.- Specified by:
shutDown
in interfaceSail
- Throws:
SailException
- If the Sail object encountered an error or unexpected situation internally.
-
getConnection
public SailConnection getConnection() throws SailException
Deprecated.Description copied from interface:Sail
Opens a connection on the Sail which can be used to query and update data. Depending on how the implementation handles concurrent access, a call to this method might block when there is another open connection on this Sail.- Specified by:
getConnection
in interfaceSail
- Throws:
SailException
- If no transaction could be started, for example because the Sail is not writable.
-
createEvaluationStrategy
protected EvaluationStrategy createEvaluationStrategy(TripleSource tripleSource, Dataset dataset, FederatedServiceResolver resolver)
Deprecated.
-
getSupportedIsolationLevels
public List<IsolationLevel> getSupportedIsolationLevels()
Deprecated.Description copied from interface:Sail
Retrieve theIsolationLevel
s supported by this SAIL, ordered by increasing complexity.- Specified by:
getSupportedIsolationLevels
in interfaceSail
- Returns:
- a non-empty List of supported Isolation Levels, in order of increasing complexity. Every SAIL supports at
least one
IsolationLevel
.
-
getDefaultIsolationLevel
public IsolationLevel getDefaultIsolationLevel()
Deprecated.Description copied from interface:Sail
Retrieves the defaultIsolationLevel
level on which transactions in this Sail operate.- Specified by:
getDefaultIsolationLevel
in interfaceSail
- Returns:
- the
IsolationLevel
that will be used withSailConnection.begin()
, for SAIL connections returned bySail.getConnection()
.
-
-