Package org.eclipse.rdf4j.federated
Class FedX
java.lang.Object
org.eclipse.rdf4j.sail.helpers.AbstractSail
org.eclipse.rdf4j.federated.FedX
- All Implemented Interfaces:
RepositoryResolverClient
,Sail
FedX serves as implementation of the federation layer. It implements RDF4J's Sail interface and can thus be used as a
normal repository in a RDF4J environment. The federation layer enables transparent access to the underlying members
as if they were a central repository.
For initialization of the federation and usage see FederationManager
.
- Author:
- Andreas Schwarte
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Add a member to the federation (internal).Gets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.protected SailConnection
Returns a store-specific SailConnection object.Gets the Sail's data directory.Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.protected void
Do store-specific operations to initialize the store.protected void
initializeMember
(Endpoint member) boolean
Checks whether this Sail object is writable, i.e.boolean
removeMember
(Endpoint endpoint) Remove a member from the federation (internal)void
setDataDir
(File dataDir) Sets the data directory for the Sail.void
setFederationContext
(FederationContext federationContext) void
setFederationEvaluationStrategy
(FederationEvaluationStrategyFactory strategyFactory) void
setRepositoryResolver
(RepositoryResolver resolver) void
setWriteStrategyFactory
(WriteStrategyFactory writeStrategyFactory) protected void
Try to shut down all federation members.Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
addSupportedIsolationLevel, connectionClosed, debugEnabled, getConnection, getDefaultIsolationLevel, getDefaultQueryEvaluationMode, getIterationCacheSyncThreshold, getSupportedIsolationLevels, init, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDefaultIsolationLevel, setDefaultQueryEvaluationMode, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, shutDown, toString
-
Constructor Details
-
FedX
-
-
Method Details
-
setFederationContext
-
setFederationEvaluationStrategy
-
setWriteStrategyFactory
- Parameters:
writeStrategyFactory
- theWriteStrategyFactory
-
addMember
Add a member to the federation (internal).If the federation is already initialized, the given endpoint is explicitly initialized as well.
- Parameters:
endpoint
-
-
removeMember
Remove a member from the federation (internal)- Parameters:
endpoint
-- Returns:
- whether the member was removed
-
getConnectionInternal
Description copied from class:AbstractSail
Returns a store-specific SailConnection object.- Specified by:
getConnectionInternal
in classAbstractSail
- Returns:
- A connection to the store.
- Throws:
SailException
-
getDataDir
Description copied from interface:Sail
Gets the Sail's data directory.- Specified by:
getDataDir
in interfaceSail
- Overrides:
getDataDir
in classAbstractSail
- See Also:
-
getValueFactory
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.
-
initializeInternal
Description copied from class:AbstractSail
Do store-specific operations to initialize the store. The default implementation of this method does nothing.- Overrides:
initializeInternal
in classAbstractSail
- Throws:
SailException
-
initializeMember
- Throws:
SailException
-
isWritable
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
-
setDataDir
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 isinvalid @link
initialized
- Specified by:
setDataDir
in interfaceSail
- Overrides:
setDataDir
in classAbstractSail
-
shutDownInternal
Try to shut down all federation members.- Specified by:
shutDownInternal
in classAbstractSail
- Throws:
FedXException
- if not all members could be shut downSailException
-
getMembers
- Returns:
- an unmodifiable view of the current members
-
setRepositoryResolver
- Specified by:
setRepositoryResolver
in interfaceRepositoryResolverClient
-
getCollectionFactory
Description copied from interface:Sail
Gets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.- Specified by:
getCollectionFactory
in interfaceSail
- Returns:
- a CollectionFactory
-