org.eclipse.rdf4j.sail.inferencer.fc

## Class DedupingInferencer

- java.lang.Object
- - org.eclipse.rdf4j.sail.helpers.SailWrapper
  - - org.eclipse.rdf4j.sail.helpers.NotifyingSailWrapper
    - - org.eclipse.rdf4j.sail.inferencer.fc.DedupingInferencer

- All Implemented Interfaces:
    FederatedServiceResolverClient, NotifyingSail, Sail, StackableSail

      public class DedupingInferencer
      extends NotifyingSailWrapper

  An inferencer may infer the same statement from two different statements. This leads to that single inferred statement undergoing inferencing multiple times, and all the statements inferred from it too, etc. This is mainly due to the use of SailConnectionListeners which don't distinguish between adding a new statement and one that already exists. Adding this inferencer to a Sail stack prevents this problem and gives a significant performance increase.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DedupingInferencer()`
    `DedupingInferencer(NotifyingSail baseSail)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InferencerConnection` | `getConnection()` Opens a connection on the Sail which can be used to query and update data.

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

      `addSailChangedListener, getBaseSail, removeSailChangedListener, setBaseSail`

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

      `getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, initialize, isWritable, setDataDir, setFederatedServiceResolver, shutDown, verifyBaseSailSet`

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

      `getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, getValueFactory, init, initialize, isWritable, setDataDir, shutDown`

- - ### Constructor Detail

    - #### DedupingInferencer

          public DedupingInferencer()

    - #### DedupingInferencer

          public DedupingInferencer(NotifyingSail baseSail)

  - ### Method Detail

    - #### getConnection

          public InferencerConnection getConnection()
                                             throws SailException

      Description copied from interface: `Sail`
      Opens a connection on the Sail which can be used to query and update data. Depending on how the implementation handles concurrent access, a call to this method might block when there is another open connection on this Sail.
      Specified by:
        `getConnection` in interface `NotifyingSail`
      Specified by:
        `getConnection` in interface `Sail`
      Overrides:
        `getConnection` in class `NotifyingSailWrapper`
      Throws:
        `SailException` - If no transaction could be started, for example because the Sail is not writable.

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