Class ExtensibleStore<T extends DataStructureInterface,N extends NamespaceStoreInterface>
- java.lang.Object
-
- org.eclipse.rdf4j.sail.helpers.AbstractSail
-
- org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
-
- org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore<T,N>
-
- All Implemented Interfaces:
FederatedServiceResolverClient
,NotifyingSail
,Sail
- Direct Known Subclasses:
ElasticsearchStore
@Experimental public abstract class ExtensibleStore<T extends DataStructureInterface,N extends NamespaceStoreInterface> extends AbstractNotifyingSail implements FederatedServiceResolverClient
A store where the backing storage can be implemented by the user. Supports up to ReadCommitted.
Extend this class and extend ExtensibleStoreConnection. Implement getConnection().
Implement the DataStructureInterface and the NamespaceStoreInterface. In your ExtensibleStore-extending class implement a constructor and set the following variables: namespaceStore, dataStructure, dataStructureInferred.
Note that the entire ExtensibleStore and all code in this package is experimental. Method signatures, class names, interfaces and the like are likely to change in future releases.
- Author:
- Håvard Mikkelsen Ottestad
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtensibleStore.Cache
-
Field Summary
Fields Modifier and Type Field Description protected T
dataStructure
protected N
namespaceStore
protected ExtensibleSailStore
sailStore
-
Fields inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock
-
-
Constructor Summary
Constructors Constructor Description ExtensibleStore()
ExtensibleStore(ExtensibleStore.Cache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Supplier<CollectionFactory>
getCollectionFactory()
Gets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.IsolationLevel
getDefaultIsolationLevel()
Retrieves the defaultIsolationLevel
level on which transactions in this Sail operate.EvaluationStatisticsEnum
getEvaluationStatisticsType()
EvaluationStrategyFactory
getEvaluationStrategyFactory()
ExtensibleStatementHelper
getExtensibleStatementHelper()
FederatedServiceResolver
getFederatedServiceResolver()
Gets theFederatedServiceResolver
used by this client.List<IsolationLevel>
getSupportedIsolationLevels()
Retrieve theIsolationLevel
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.protected void
initializeInternal()
Do store-specific operations to initialize the store.void
setEvaluationStrategyFactory(EvaluationStrategyFactory evalStratFactory)
void
setFederatedServiceResolver(FederatedServiceResolver resolver)
Sets theFederatedServiceResolver
to use for this client.protected void
shutDownInternal()
Do store-specific operations to ensure proper shutdown of the store.-
Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
addSailChangedListener, getConnection, getConnectionInternal, notifySailChanged, removeSailChangedListener
-
Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
addSupportedIsolationLevel, connectionClosed, debugEnabled, getDataDir, getDefaultQueryEvaluationMode, getIterationCacheSyncThreshold, init, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDataDir, setDefaultIsolationLevel, setDefaultQueryEvaluationMode, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, shutDown, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.sail.Sail
getDataDir, init, isWritable, setDataDir, shutDown
-
-
-
-
Field Detail
-
sailStore
protected ExtensibleSailStore sailStore
-
namespaceStore
protected N extends NamespaceStoreInterface namespaceStore
-
dataStructure
protected T extends DataStructureInterface dataStructure
-
-
Constructor Detail
-
ExtensibleStore
public ExtensibleStore()
-
ExtensibleStore
public ExtensibleStore(ExtensibleStore.Cache cache)
-
-
Method Detail
-
initializeInternal
protected void initializeInternal() throws SailException
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
-
getSupportedIsolationLevels
public List<IsolationLevel> getSupportedIsolationLevels()
Description copied from interface:Sail
Retrieve theIsolationLevel
s supported by this SAIL, ordered by increasing complexity.- Specified by:
getSupportedIsolationLevels
in interfaceSail
- Overrides:
getSupportedIsolationLevels
in classAbstractSail
- 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()
Description copied from interface:Sail
Retrieves the defaultIsolationLevel
level on which transactions in this Sail operate.- Specified by:
getDefaultIsolationLevel
in interfaceSail
- Overrides:
getDefaultIsolationLevel
in classAbstractSail
- Returns:
- the
IsolationLevel
that will be used withSailConnection.begin()
, for SAIL connections returned bySail.getConnection()
.
-
setFederatedServiceResolver
public void setFederatedServiceResolver(FederatedServiceResolver resolver)
Description copied from interface:FederatedServiceResolverClient
Sets theFederatedServiceResolver
to use for this client.- Specified by:
setFederatedServiceResolver
in interfaceFederatedServiceResolverClient
- Parameters:
resolver
- The resolver to use.
-
getValueFactory
public ValueFactory 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.
-
getEvaluationStrategyFactory
public EvaluationStrategyFactory getEvaluationStrategyFactory()
-
getFederatedServiceResolver
public FederatedServiceResolver getFederatedServiceResolver()
Description copied from interface:FederatedServiceResolverClient
Gets theFederatedServiceResolver
used by this client.- Specified by:
getFederatedServiceResolver
in interfaceFederatedServiceResolverClient
-
setEvaluationStrategyFactory
public void setEvaluationStrategyFactory(EvaluationStrategyFactory evalStratFactory)
-
shutDownInternal
protected void shutDownInternal() throws SailException
Description copied from class:AbstractSail
Do store-specific operations to ensure proper shutdown of the store.- Specified by:
shutDownInternal
in classAbstractSail
- Throws:
SailException
-
getEvaluationStatisticsType
public EvaluationStatisticsEnum getEvaluationStatisticsType()
-
getExtensibleStatementHelper
public ExtensibleStatementHelper getExtensibleStatementHelper()
-
getCollectionFactory
public Supplier<CollectionFactory> 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
-
-