Package org.eclipse.rdf4j.federated.endpoint

## Class EndpointBase.ManagedRepositoryConnection

- java.lang.Object
- - org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection
  - - org.eclipse.rdf4j.repository.base.RepositoryConnectionWrapper
    - - org.eclipse.rdf4j.federated.endpoint.EndpointBase.ManagedRepositoryConnection

- All Implemented Interfaces:
    `AutoCloseable`, `DelegatingRepositoryConnection`, `RepositoryConnection`
  Enclosing class:
    EndpointBase

      public static class EndpointBase.ManagedRepositoryConnection
      extends RepositoryConnectionWrapper

  A wrapper for managed `RepositoryConnection`s which makes sure that `close()` is a no-op, i.e. the actual closing of the managed connection is controlled by the `Endpoint`.
  Author:
    Andreas Schwarte

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ManagedRepositoryConnection​(Repository repository, RepositoryConnection delegate)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | Closes the connection, freeing resources.
    `void` | `closeManagedConnection()` |

    - ### Methods inherited from class org.eclipse.rdf4j.repository.base.RepositoryConnectionWrapper

      `add, add, add, add, add, add, add, add, addWithoutCommit, begin, begin, begin, clear, clearNamespaces, commit, exportStatements, exportStatements, getContextIDs, getDelegate, getIsolationLevel, getNamespace, getNamespaces, getStatements, hasStatement, hasStatement, isActive, isAutoCommit, isDelegatingAdd, isDelegatingRead, isDelegatingRemove, isEmpty, isOpen, prepare, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, prepareUpdate, remove, remove, remove, remove, removeNamespace, removeWithoutCommit, rollback, setAutoCommit, setDelegate, setIsolationLevel, setNamespace, setParserConfig, size`

    - ### Methods inherited from class org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection

      `addWithoutCommit, conditionalCommit, conditionalRollback, export, getParserConfig, getRepository, getValueFactory, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, prepareUpdate, removeWithoutCommit, startLocalTransaction`

    - ### 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.repository.RepositoryConnection

      `add, add, add, add, add, add, add, export, getParserConfig, getRepository, getStatements, getValueFactory, prepareBooleanQuery, prepareBooleanQuery, prepareGraphQuery, prepareGraphQuery, prepareQuery, prepareQuery, prepareTupleQuery, prepareTupleQuery, prepareUpdate, prepareUpdate, remove`

- - ### Constructor Detail

    - #### ManagedRepositoryConnection

          public ManagedRepositoryConnection​(Repository repository,
                                             RepositoryConnection delegate)

  - ### Method Detail

    - #### close

          public void close()
                     throws RepositoryException

      Description copied from interface: `RepositoryConnection`
      Closes the connection, freeing resources. If a `transaction` is `active` on the connection, all non-committed operations will be lost by actively calling `RepositoryConnection.rollback()` on any active transactions.

      Implementation note: All implementations must override this method if they have any resources that they need to free.

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `RepositoryConnection`
      Overrides:
        `close` in class `RepositoryConnectionWrapper`
      Throws:
        `RepositoryException` - If the connection could not be closed.

    - #### closeManagedConnection

          public void closeManagedConnection()
                                      throws RepositoryException

      Throws:
        `RepositoryException`