com.holonplatform.datastore.jdbc.composer

## Interface ConnectionHandler

- All Known Subinterfaces:
    JdbcDatastore, JdbcDatastoreCommodityContext, JdbcOperationContext
  All Known Implementing Classes:
    DefaultJdbcDatastore

      public interface ConnectionHandler

  JDBC connection handler.

  The concrete handler should manage connection lifecycle, including connection retrieving and releasing.

  Since:
    5.1.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `<R> R` | `withConnection(ConnectionOperation<R> operation)` Execute given `ConnectionOperation` using a managed connection.
    `default void` | `withConnection(ConnectionRunnable operation)` Execute given `ConnectionRunnable` operation using a managed connection.

- - ### Method Detail

    - #### withConnection

          <R> R withConnection(ConnectionOperation<R> operation)

      Execute given `ConnectionOperation` using a managed connection.
      Type Parameters:
        `R` - Operation result type
      Parameters:
        `operation` - Operation to execute (not null)
      Returns:
        Operation result

    - #### withConnection

          default void withConnection(ConnectionRunnable operation)

      Execute given `ConnectionRunnable` operation using a managed connection.
      Parameters:
        `operation` - Operation to execute (not null)

Copyright © 2019 The Holon Platform. All rights reserved.