org.eclipse.rdf4j.sail.elasticsearchstore

## 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!

  There is no write-ahead logging, so a failure during a transaction may result in partially persisted changes.

  Author:
    Håvard Mikkelsen Ottestad

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore

      `dataStructure, namespaceStore, sailStore`

    - ### Fields inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail

      `connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool, String index)`
    `ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool, String index, boolean cacheEnabled)`
    `ElasticsearchStore(org.elasticsearch.client.Client client, String index)`
    `ElasticsearchStore(org.elasticsearch.client.Client client, String index, boolean cacheEnabled)`
    `ElasticsearchStore(String hostname, int port, String clusterName, String index)`
    `ElasticsearchStore(String hostname, int port, String clusterName, String index, boolean cacheEnabled)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClusterName()`
    `protected NotifyingSailConnection` | `getConnectionInternal()` Returns a store-specific SailConnection object.
    `ExtensibleStatementHelper` | `getExtensibleStatementHelper()`
    `String` | `getHostname()`
    `String` | `getIndex()`
    `int` | `getPort()`
    `protected void` | `initializeInternal()` Do store-specific operations to initialize the store.
    `boolean` | `isWritable()` Checks whether this Sail object is writable, i.e.
    `void` | `setElasticsearchBulkSize(int size)`
    `void` | `setElasticsearchScrollTimeout(int timeout)`
    `protected void` | `shutDownInternal()` Do store-specific operations to ensure proper shutdown of the store.
    `void` | `waitForElasticsearch(int time, java.time.temporal.TemporalUnit timeUnit)`

    - ### Methods inherited from class org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStore

      `getDefaultIsolationLevel, getEvaluationStatisticsType, getEvaluationStrategyFactory, getFederatedServiceResolver, getSupportedIsolationLevels, getValueFactory, setEvaluationStrategyFactory, setFederatedServiceResolver`

    - ### Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail

      `addSailChangedListener, getConnection, notifySailChanged, removeSailChangedListener`

    - ### Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail

      `addSupportedIsolationLevel, connectionClosed, debugEnabled, getDataDir, getIterationCacheSyncThreshold, init, initialize, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDataDir, setDefaultIsolationLevel, 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, initialize, setDataDir, shutDown`

- - ### Constructor Detail

    - #### ElasticsearchStore

          public ElasticsearchStore(String hostname,
                                    int port,
                                    String clusterName,
                                    String index)

    - #### ElasticsearchStore

          public ElasticsearchStore(String hostname,
                                    int port,
                                    String clusterName,
                                    String index,
                                    boolean cacheEnabled)

    - #### ElasticsearchStore

          public ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool,
                                    String index)

    - #### ElasticsearchStore

          public ElasticsearchStore(org.eclipse.rdf4j.sail.elasticsearchstore.ClientProvider clientPool,
                                    String index,
                                    boolean cacheEnabled)

    - #### ElasticsearchStore

          public ElasticsearchStore(org.elasticsearch.client.Client client,
                                    String index)

    - #### ElasticsearchStore

          public ElasticsearchStore(org.elasticsearch.client.Client client,
                                    String index,
                                    boolean cacheEnabled)

  - ### 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 class `ExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore>`
      Throws:
        `SailException`

    - #### shutDownInternal

          protected void shutDownInternal()
                                   throws SailException

      Description copied from class: `AbstractSail`
      Do store-specific operations to ensure proper shutdown of the store.
      Overrides:
        `shutDownInternal` in class `ExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore>`
      Throws:
        `SailException`

    - #### waitForElasticsearch

          public void waitForElasticsearch(int time,
                                           java.time.temporal.TemporalUnit timeUnit)

    - #### setElasticsearchScrollTimeout

          public void setElasticsearchScrollTimeout(int timeout)

    - #### getConnectionInternal

          protected NotifyingSailConnection getConnectionInternal()
                                                           throws SailException

      Description copied from class: `AbstractSail`
      Returns a store-specific SailConnection object.
      Specified by:
        `getConnectionInternal` in class `AbstractNotifyingSail`
      Returns:
        A connection to the store.
      Throws:
        `SailException`

    - #### isWritable

          public boolean isWritable()
                             throws SailException

      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.
      Throws:
        `SailException`

    - #### getHostname

          public String getHostname()

    - #### getPort

          public int getPort()

    - #### getClusterName

          public String getClusterName()

    - #### getIndex

          public String getIndex()

    - #### setElasticsearchBulkSize

          public void setElasticsearchBulkSize(int size)

    - #### getExtensibleStatementHelper

          public ExtensibleStatementHelper getExtensibleStatementHelper()

      Overrides:
        `getExtensibleStatementHelper` in class `ExtensibleStore<org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchDataStructure,org.eclipse.rdf4j.sail.elasticsearchstore.ElasticsearchNamespaceStore>`

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.