Class ElasticsearchStore
java.lang.Object
org.eclipse.rdf4j.sail.helpers.AbstractSail
org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore>
org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchStore
- All Implemented Interfaces:
FederatedServiceResolverClient,NotifyingSail,Sail
@Experimental
public class ElasticsearchStore
extends ExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore>
An RDF4J SailStore persisted to Elasticsearch.
This is an EXPERIMENTAL feature. Use at your own risk!
Note that, while RDF4J is licensed under the EDL, several ElasticSearch dependencies are licensed under the Elastic
License or the SSPL, which may have implications for some projects.
Please consult the ElasticSearch website and Elastic license FAQ for more information.
There is no write-ahead logging, so a failure during a transaction may result in partially persisted changes.
- Author:
- HÃ¥vard Mikkelsen Ottestad
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore
ExtensibleStore.Cache -
Field Summary
Fields inherited from class org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore
dataStructure, namespaceStore, sailStoreFields inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchStore(String hostname, int port, String clusterName, String index) ElasticsearchStore(String hostname, int port, String clusterName, String index, ExtensibleStore.Cache cache) ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool, String index) ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool, String index, ExtensibleStore.Cache cache) ElasticsearchStore(org.elasticsearch.client.Client client, String index) ElasticsearchStore(org.elasticsearch.client.Client client, String index, ExtensibleStore.Cache cache) -
Method Summary
Modifier and TypeMethodDescriptionprotected NotifyingSailConnectionReturns a store-specific SailConnection object.getIndex()intgetPort()protected voidDo store-specific operations to initialize the store.booleanChecks whether this Sail object is writable, i.e.voidsetElasticsearchBulkSize(int size) voidsetElasticsearchScrollTimeout(int timeout) protected voidDo store-specific operations to ensure proper shutdown of the store.voidwaitForElasticsearch(int time, TemporalUnit timeUnit) Methods inherited from class org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore
getCollectionFactory, getDefaultIsolationLevel, getEvaluationStatisticsType, getEvaluationStrategyFactory, getFederatedServiceResolver, getSupportedIsolationLevels, getValueFactory, setEvaluationStrategyFactory, setFederatedServiceResolverMethods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
addSailChangedListener, getConnection, notifySailChanged, removeSailChangedListenerMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.sail.Sail
getDataDir, init, setDataDir, shutDown
-
Constructor Details
-
ElasticsearchStore
-
ElasticsearchStore
public ElasticsearchStore(String hostname, int port, String clusterName, String index, ExtensibleStore.Cache cache) -
ElasticsearchStore
public ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool, String index) -
ElasticsearchStore
public ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool, String index, ExtensibleStore.Cache cache) -
ElasticsearchStore
-
ElasticsearchStore
public ElasticsearchStore(org.elasticsearch.client.Client client, String index, ExtensibleStore.Cache cache)
-
-
Method Details
-
initializeInternal
Description copied from class:AbstractSailDo store-specific operations to initialize the store. The default implementation of this method does nothing.- Overrides:
initializeInternalin classExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore> - Throws:
SailException
-
shutDownInternal
Description copied from class:AbstractSailDo store-specific operations to ensure proper shutdown of the store.- Overrides:
shutDownInternalin classExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore> - Throws:
SailException
-
waitForElasticsearch
-
setElasticsearchScrollTimeout
public void setElasticsearchScrollTimeout(int timeout) -
getConnectionInternal
Description copied from class:AbstractSailReturns a store-specific SailConnection object.- Specified by:
getConnectionInternalin classAbstractNotifyingSail- Returns:
- A connection to the store.
- 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.- Throws:
SailException
-
getHostname
-
getPort
public int getPort() -
getClusterName
-
getIndex
-
setElasticsearchBulkSize
public void setElasticsearchBulkSize(int size) -
getExtensibleStatementHelper
- Overrides:
getExtensibleStatementHelperin classExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore>
-