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 AbstractSail
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLockModifier and TypeFieldDescriptionprotected longConnection timeout on shutdown (in ms).protected static final longDefault connection timeout on shutdown: 20,000 milliseconds (20 seconds).protected static final longdefault value for the Iteration item sync thresholdprotected final ReentrantReadWriteLockLock used to synchronize the initialization state of a sail. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd 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 SailConnectionReturns 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 voidDo store-specific operations to initialize the store.protected voidinitializeMember(Endpoint member) booleanChecks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.booleanremoveMember(Endpoint endpoint) Remove a member from the federation (internal)voidsetDataDir(File dataDir) Sets the data directory for the Sail.voidsetFederationContext(FederationContext federationContext) voidsetFederationEvaluationStrategy(FederationEvaluationStrategyFactory strategyFactory) voidsetRepositoryResolver(RepositoryResolver resolver) voidsetSchedulerFactory(SchedulerFactory schedulerFactory) Set theSchedulerFactory.voidsetWriteStrategyFactory(WriteStrategyFactory writeStrategyFactory) protected voidTry to shut down all federation members.Methods inherited from class AbstractSail
addSupportedIsolationLevel, connectionClosed, debugEnabled, getConnection, getDefaultIsolationLevel, getDefaultQueryEvaluationMode, getIterationCacheSyncThreshold, getSupportedIsolationLevels, init, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDefaultIsolationLevel, setDefaultQueryEvaluationMode, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, shutDown, toStringModifier and TypeMethodDescriptionprotected voidAppends the providedIsolationLevelsto the SAIL's list of supported isolation levels.protected voidconnectionClosed(SailConnection connection) Signals to the store that the supplied connection has been closed; called byAbstractSailConnection.close().protected static booleanOpens a connection on the Sail which can be used to query and update data.Retrieves the defaultIsolationLevellevel on which transactions in this Sail operate.longRetrieves the currently configured threshold for syncing query evaluation iteration caches to disk.Retrieve theIsolationLevels supported by this SAIL, ordered by increasing complexity.voidinit()Initializes the Sail.protected booleanChecks whether the Sail has been initialized.booleanReturns the status of the result size tracking for the query plan.protected voidRemoves all occurrences of the providedIsolationLevelsin the list of supported Isolation levels.voidsetConnectionTimeOut(long connectionTimeOut) Set connection timeout on shutdown (in ms).voidsetDefaultIsolationLevel(IsolationLevel defaultIsolationLevel) Sets the defaultIsolationLevelon which transactions in this Sail operate.voidsetDefaultQueryEvaluationMode(QueryEvaluationMode defaultQueryEvaluationMode) voidsetIterationCacheSyncThreshold(long iterationCacheSyncThreshold) Set the threshold for syncing query evaluation iteration caches to disk.protected voidsetSupportedIsolationLevels(List<IsolationLevel> supportedIsolationLevels) Sets the list of supportedIsolationLevelss for this SAIL.protected voidsetSupportedIsolationLevels(IsolationLevel... supportedIsolationLevels) Sets the list of supportedIsolationLevelss for this SAIL.voidsetTrackResultSize(boolean trackResultSize) Enable or disable results size tracking for the query plan.voidshutDown()Shuts down the Sail, giving it the opportunity to synchronize any stale data.toString()
-
Constructor Details
-
FedX
-
-
Method Details
-
setFederationContext
-
setFederationEvaluationStrategy
-
setSchedulerFactory
Set theSchedulerFactory. Can only be done before initialization of the federation- Parameters:
schedulerFactory- theSchedulerFactory
-
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:AbstractSailReturns a store-specific SailConnection object.- Specified by:
getConnectionInternalin classAbstractSail- Returns:
- A connection to the store.
- Throws:
SailException
-
getDataDir
Description copied from interface:SailGets the Sail's data directory.- Specified by:
getDataDirin interfaceSail- Overrides:
getDataDirin classAbstractSail- See Also:
-
getValueFactory
Description copied from interface:SailGets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.- Specified by:
getValueFactoryin interfaceSail- Returns:
- a ValueFactory object for this Sail object.
-
initializeInternal
Description copied from class:AbstractSailDo store-specific operations to initialize the store. The default implementation of this method does nothing.- Overrides:
initializeInternalin classAbstractSail- Throws:
SailException
-
initializeMember
- Throws:
SailException
-
isWritable
Description copied from interface:SailChecks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.- Specified by:
isWritablein interfaceSail- Throws:
SailException
-
setDataDir
Description copied from interface:SailSets 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 is.invalid reference
initialized- Specified by:
setDataDirin interfaceSail- Overrides:
setDataDirin classAbstractSail
-
shutDownInternal
Try to shut down all federation members.- Specified by:
shutDownInternalin classAbstractSail- Throws:
FedXException- if not all members could be shut downSailException
-
getMembers
-
setRepositoryResolver
- Specified by:
setRepositoryResolverin interfaceRepositoryResolverClient
-
getCollectionFactory
Description copied from interface:SailGets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.- Specified by:
getCollectionFactoryin interfaceSail- Returns:
- a CollectionFactory
-