org.eclipse.rdf4j.lucene.spin

## Class LuceneSpinSailConnection

- java.lang.Object
- - org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
  - - org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
    - - org.eclipse.rdf4j.lucene.spin.LuceneSpinSailConnection

- All Implemented Interfaces:
    AutoCloseable, FederatedServiceResolverClient, NotifyingSailConnection, SailConnection

  Deprecated.
  since 3.0. The experimental LuceneSpinSail is scheduled to be removed by the next major release.

      @Deprecated
       @Experimental
      public class LuceneSpinSailConnection
      extends NotifyingSailConnectionWrapper

  This connection inherits Lucene index supporting methods from `LuceneSailConnection`.
  Author:
    sauermann, christian.huetter, jacek grzebyta

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SailConnectionListener` | `connectionListener` Deprecated. The listener that listens to the underlying connection.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneSpinSailConnection(NotifyingSailConnection wrappedConnection, SearchIndex luceneIndex, LuceneSpinSail sail)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStatement(Resource subj, IRI pred, Value obj, Resource... contexts)` Deprecated. Adds a statement to the store.
    `void` | `begin()` Deprecated. Begins a transaction requiring `SailConnection.commit()` or `SailConnection.rollback()` to be called to close the transaction.
    `void` | `clear(Resource... resources)` Deprecated. Removes all statements from the specified/all contexts.
    `void` | `close()` Deprecated. Closes the connection.
    `void` | `commit()` Deprecated. Commits any updates that have been performed since the last time `SailConnection.commit()` or `SailConnection.rollback()` was called.
    `void` | `removeStatements(Resource subj, IRI pred, Value obj, Resource... contexts)` Deprecated. Removes all statements matching the specified subject, predicate and object from the repository.
    `void` | `rollback()` Deprecated. Rolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.

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

      `addConnectionListener, getWrappedConnection, removeConnectionListener`

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

      `addStatement, begin, clearNamespaces, endUpdate, evaluate, explain, flush, getContextIDs, getNamespace, getNamespaces, getStatements, isActive, isOpen, pendingRemovals, prepare, prepareQuery, removeNamespace, removeStatement, setFederatedServiceResolver, setNamespace, setTransactionSettings, size, size, startUpdate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.sail.SailConnection

      `addStatement, addStatement, addStatement, begin, clearNamespaces, endUpdate, evaluate, explain, flush, getContextIDs, getNamespace, getNamespaces, getStatements, getStatements, hasStatement, isActive, isOpen, pendingRemovals, prepare, prepareQuery, removeNamespace, removeStatement, removeStatement, removeStatements, setNamespace, setTransactionSettings, size, startUpdate`

- - ### Field Detail

    - #### connectionListener

          protected final SailConnectionListener connectionListener

      Deprecated.
      The listener that listens to the underlying connection. It is disabled during clearContext operations.

  - ### Constructor Detail

    - #### LuceneSpinSailConnection

          public LuceneSpinSailConnection(NotifyingSailConnection wrappedConnection,
                                          SearchIndex luceneIndex,
                                          LuceneSpinSail sail)

      Deprecated.

  - ### Method Detail

    - #### addStatement

          public void addStatement(Resource subj,
                                   IRI pred,
                                   Value obj,
                                   Resource... contexts)
                            throws SailException

      Deprecated.
      Description copied from interface: `SailConnection`
      Adds a statement to the store.
      Specified by:
        `addStatement` in interface `SailConnection`
      Overrides:
        `addStatement` in class `SailConnectionWrapper`
      Parameters:
        `subj` - The subject of the statement to add.
        `pred` - The predicate of the statement to add.
        `obj` - The object of the statement to add.
        `contexts` - The context(s) to add the statement to. Note that this parameter is a vararg and as such is optional. If no contexts are specified, a context-less statement will be added.
      Throws:
        `SailException` - If the statement could not be added, for example because no transaction is active.

    - #### close

          public void close()
                     throws SailException

      Deprecated.
      Description copied from interface: `SailConnection`
      Closes the connection. Any updates that haven't been committed yet will be rolled back. The connection can no longer be used once it is closed.
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `SailConnection`
      Overrides:
        `close` in class `SailConnectionWrapper`
      Throws:
        `SailException`

    - #### clear

          public void clear(Resource... resources)
                     throws SailException

      Deprecated.
      Description copied from interface: `SailConnection`
      Removes all statements from the specified/all contexts. If no contexts are specified the method operates on the entire repository.
      Specified by:
        `clear` in interface `SailConnection`
      Overrides:
        `clear` in class `SailConnectionWrapper`
      Parameters:
        `resources` - The context(s) from which to remove the statements. Note that this parameter is a vararg and as such is optional. If no contexts are specified the method operates on the entire repository. A `null` value can be used to match context-less statements.
      Throws:
        `SailException` - If the statements could not be removed.

    - #### begin

          public void begin()
                     throws SailException

      Deprecated.
      Description copied from interface: `SailConnection`
      Begins a transaction requiring `SailConnection.commit()` or `SailConnection.rollback()` to be called to close the transaction. The transaction will use the default `IsolationLevel` level for the SAIL, as returned by `Sail.getDefaultIsolationLevel()`.
      Specified by:
        `begin` in interface `SailConnection`
      Overrides:
        `begin` in class `SailConnectionWrapper`
      Throws:
        `SailException` - If the connection could not start a transaction or if a transaction is already active on this connection.

    - #### commit

          public void commit()
                      throws SailException

      Deprecated.
      Description copied from interface: `SailConnection`
      Commits any updates that have been performed since the last time `SailConnection.commit()` or `SailConnection.rollback()` was called.
      Specified by:
        `commit` in interface `SailConnection`
      Overrides:
        `commit` in class `SailConnectionWrapper`
      Throws:
        `UnknownSailTransactionStateException` - If the transaction state can not be determined (this can happen for instance when communication between client and server fails or times-out). It does not indicate a problem with the integrity of the store.
        `SailException` - If the SailConnection could not be committed.

    - #### removeStatements

          public void removeStatements(Resource subj,
                                       IRI pred,
                                       Value obj,
                                       Resource... contexts)
                                throws SailException

      Deprecated.
      Removes all statements matching the specified subject, predicate and object from the repository. All three parameters may be null to indicate wildcards.
      Specified by:
        `removeStatements` in interface `SailConnection`
      Overrides:
        `removeStatements` in class `SailConnectionWrapper`
      Parameters:
        `subj` - The subject of the statement that should be removed, or `null` to indicate a wildcard.
        `pred` - The predicate of the statement that should be removed, or `null` to indicate a wildcard.
        `obj` - The object of the statement that should be removed , or `null` to indicate a wildcard. *
        `contexts` - The context(s) from which to remove the statement. Note that this parameter is a vararg and as such is optional. If no contexts are specified the method operates on the entire repository. A `null` value can be used to match context-less statements.
      Throws:
        `SailException` - If the statement could not be removed, for example because no transaction is active.

    - #### rollback

          public void rollback()
                        throws SailException

      Deprecated.
      Description copied from interface: `SailConnection`
      Rolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.
      Specified by:
        `rollback` in interface `SailConnection`
      Overrides:
        `rollback` in class `SailConnectionWrapper`
      Throws:
        `UnknownSailTransactionStateException` - If the transaction state can not be determined (this can happen for instance when communication between client and server fails or times-out). It does not indicate a problem with the integrity of the store.
        `SailException` - If the SailConnection could not be rolled back.

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