Package org.eclipse.rdf4j.sail.nativerdf

## Class NativeStoreConnection

- java.lang.Object
- - org.eclipse.rdf4j.sail.helpers.AbstractSailConnection
  - - org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSailConnection
    - - org.eclipse.rdf4j.sail.base.SailSourceConnection
      - - org.eclipse.rdf4j.sail.nativerdf.NativeStoreConnection

- All Implemented Interfaces:
    `AutoCloseable`, `FederatedServiceResolverClient`, `ThreadSafetyAware`, `InferencerConnection`, `NotifyingSailConnection`, `SailConnection`
  Direct Known Subclasses:
    `LimitedSizeNativeStoreConnection`

      public class NativeStoreConnection
      extends SailSourceConnection
      implements ThreadSafetyAware

  Author:
    Arjohn Kampman

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected NativeStore` | `nativeStore` |

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

      `connectionLock, updateLock`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `NativeStoreConnection​(NativeStore sail)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `addInferredStatement​(Resource subj, IRI pred, Value obj, Resource... contexts)` | Adds an inferred statement to a specific context.
    `protected void` | `addStatementInternal​(Resource subj, IRI pred, Value obj, Resource... contexts)` |
    `void` | `clearInferred​(Resource... contexts)` | Removes all inferred statements from the specified/all contexts.
    `protected void` | `clearInternal​(Resource... contexts)` |
    `protected void` | `commitInternal()` |
    `boolean` | `removeInferredStatement​(Resource subj, IRI pred, Value obj, Resource... contexts)` | Removes an inferred statement from a specific context.
    `protected void` | `removeStatementsInternal​(Resource subj, IRI pred, Value obj, Resource... contexts)` |
    `protected void` | `rollbackInternal()` |
    `protected void` | `startTransactionInternal()` |
    `boolean` | `supportsConcurrentReads()` | A class may support concurrent reads from multiple threads against the same object.

    - ### Methods inherited from class org.eclipse.rdf4j.sail.base.SailSourceConnection

      `addStatement, clearNamespacesInternal, closeInternal, endUpdateInternal, evaluateInternal, explain, flushUpdates, getContextIDsInternal, getEvaluationStrategy, getFederatedServiceResolver, getNamespaceInternal, getNamespacesInternal, getStatementsInternal, prepareInternal, removeNamespaceInternal, removeStatement, setFederatedServiceResolver, setNamespaceInternal, sizeInternal, startUpdate`

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

      `addConnectionListener, hasConnectionListeners, notifyStatementAdded, notifyStatementRemoved, removeConnectionListener`

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

      `addStatement, autoStartTransaction, begin, begin, clear, clearNamespaces, close, commit, endUpdate, evaluate, flush, getContextIDs, getExclusiveConnectionLock, getNamespace, getNamespaces, getSharedConnectionLock, getStatements, getTransactionIsolation, getTransactionLock, isActive, isActiveOperation, isOpen, iterationClosed, pendingAdds, pendingRemovals, prepare, registerIteration, removeNamespace, removeStatements, rollback, setNamespace, size, transactionActive, verifyIsActive, verifyIsOpen`

    - ### 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.NotifyingSailConnection

      `addConnectionListener, removeConnectionListener`

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

      `addStatement, begin, begin, clear, clearNamespaces, close, commit, endUpdate, evaluate, flush, getContextIDs, getNamespace, getNamespaces, getStatements, hasStatement, isActive, isOpen, pendingRemovals, prepare, prepareQuery, removeNamespace, removeStatements, rollback, setNamespace, setTransactionSettings, size`

- - ### Field Detail

    - #### nativeStore

          protected final NativeStore nativeStore

  - ### Constructor Detail

    - #### NativeStoreConnection

          protected NativeStoreConnection​(NativeStore sail)
                                   throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### startTransactionInternal

          protected void startTransactionInternal()
                                           throws SailException

      Overrides:
        `startTransactionInternal` in class `SailSourceConnection`
      Throws:
        `SailException`

    - #### commitInternal

          protected void commitInternal()
                                 throws SailException

      Overrides:
        `commitInternal` in class `SailSourceConnection`
      Throws:
        `SailException`

    - #### rollbackInternal

          protected void rollbackInternal()
                                   throws SailException

      Overrides:
        `rollbackInternal` in class `SailSourceConnection`
      Throws:
        `SailException`

    - #### addStatementInternal

          protected void addStatementInternal​(Resource subj,
                                              IRI pred,
                                              Value obj,
                                              Resource... contexts)
                                       throws SailException

      Specified by:
        `addStatementInternal` in class `AbstractSailConnection`
      Throws:
        `SailException`

    - #### addInferredStatement

          public boolean addInferredStatement​(Resource subj,
                                              IRI pred,
                                              Value obj,
                                              Resource... contexts)
                                       throws SailException

      Description copied from interface: `InferencerConnection`
      Adds an inferred statement to a specific context.
      Specified by:
        `addInferredStatement` in interface `InferencerConnection`
      Overrides:
        `addInferredStatement` in class `SailSourceConnection`
      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 supplied the method operates on the entire repository.
      Throws:
        `SailException` - If the statement could not be added.

    - #### removeStatementsInternal

          protected void removeStatementsInternal​(Resource subj,
                                                  IRI pred,
                                                  Value obj,
                                                  Resource... contexts)
                                           throws SailException

      Specified by:
        `removeStatementsInternal` in class `AbstractSailConnection`
      Throws:
        `SailException`

    - #### removeInferredStatement

          public boolean removeInferredStatement​(Resource subj,
                                                 IRI pred,
                                                 Value obj,
                                                 Resource... contexts)
                                          throws SailException

      Description copied from interface: `InferencerConnection`
      Removes an inferred statement from a specific context.
      Specified by:
        `removeInferredStatement` in interface `InferencerConnection`
      Overrides:
        `removeInferredStatement` in class `SailSourceConnection`
      Parameters:
        `subj` - The subject of the statement that should be removed.
        `pred` - The predicate of the statement that should be removed.
        `obj` - The object of the statement that should be removed.
        `contexts` - 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 supplied the method operates on the entire repository.
      Throws:
        `SailException` - If the statement could not be removed.

    - #### clearInternal

          protected void clearInternal​(Resource... contexts)
                                throws SailException

      Overrides:
        `clearInternal` in class `SailSourceConnection`
      Throws:
        `SailException`

    - #### clearInferred

          public void clearInferred​(Resource... contexts)
                             throws SailException

      Description copied from interface: `InferencerConnection`
      Removes all inferred statements from the specified/all contexts. If no contexts are specified the method operates on the entire repository.
      Specified by:
        `clearInferred` in interface `InferencerConnection`
      Overrides:
        `clearInferred` in class `SailSourceConnection`
      Parameters:
        `contexts` - 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 supplied the method operates on the entire repository.
      Throws:
        `SailException` - If the statements could not be removed.

    - #### supportsConcurrentReads

          public boolean supportsConcurrentReads()

      Description copied from interface: `ThreadSafetyAware`
      A class may support concurrent reads from multiple threads against the same object. This ability may change based on an object's current state.
      Specified by:
        `supportsConcurrentReads` in interface `ThreadSafetyAware`
      Returns:
        true if this object supports concurrent reads