Interface HybrisDataSource

All Superinterfaces:
CommonDataSource, DataSource, Wrapper
All Known Implementing Classes:
DataSourceImpl, SlaveTenantDataSource

public interface HybrisDataSource extends DataSource
  • Method Details

    • getDataSourceFactory

      DataSourceFactory getDataSourceFactory()
    • getDriverVersion

      String getDriverVersion()
      Returns:
      the database driver version
    • getConnectionParameters

      Map<String,String> getConnectionParameters()
    • getJNDIName

      String getJNDIName()
      Returns:
      the JNDI name
    • getID

      String getID()
      Returns:
      the ID of the current data source
    • getConnectionPool

      JDBCConnectionPool getConnectionPool()
    • getTenant

      Tenant getTenant()
    • getConnection

      Connection getConnection(boolean transactionBound) throws SQLException
      Throws:
      SQLException
    • returnToPool

      void returnToPool(ConnectionImpl conn)
    • invalidate

      void invalidate(ConnectionImpl conn)
    • destroy

      void destroy()
    • getNumInUse

      int getNumInUse()
      Returns:
      the number of instances currently borrowed from the pool.
    • getNumPhysicalOpen

      int getNumPhysicalOpen()
      Returns:
      number of currently open JDBC connections.
    • getNumReadOnlyOpen

      default int getNumReadOnlyOpen()
      Returns:
      number of open connections that are read-only
    • getMaxInUse

      int getMaxInUse()
      Returns:
      the maximum number of the 'in use' connection
    • getMaxPhysicalOpen

      int getMaxPhysicalOpen()
      Returns:
      the maximum number of physical SQL connections.
    • totalGets

      long totalGets()
      Returns:
      Total number of connections so far. Reset with resetStats()
    • getMaxAllowedPhysicalOpen

      int getMaxAllowedPhysicalOpen()
      Returns:
      the maximum number of objects that can be allocated by the pool
    • getMillisWaitedForConnection

      long getMillisWaitedForConnection()
      Returns:
      the time in milliseconds how long it took to get a connection from the pool
    • resetStats

      void resetStats()
      Reset the statistics. Those are getMillisWaitedForConnection(), getMaxInUse() and totalGets()
    • getLogUtils

      JDBCLogUtils getLogUtils()
    • getDatabaseName

      String getDatabaseName()
      Returns:
      the database name
    • getMaxPreparedParameterCount

      int getMaxPreparedParameterCount()
      Returns:
      the maximum allowed number of parameters within one prepared statement; -1 if no limit exists
    • getDatabaseVersion

      String getDatabaseVersion()
      Returns:
      the database version
    • getDatabaseURL

      String getDatabaseURL()
      Returns:
      the URL of the database
    • getCustomSessionSQL

      String getCustomSessionSQL()
    • getDatabaseUser

      String getDatabaseUser()
      Returns:
      the database user
    • getSchemaName

      String getSchemaName()
      Returns:
      the schema name of the database
    • cannotConnect

      boolean cannotConnect()
      Returns:
      true if a connection the pool is not possible.
    • isDBLogActive

      boolean isDBLogActive()
    • isDBLogAppendStackTraceActive

      boolean isDBLogAppendStackTraceActive()
    • setDBLog

      void setDBLog(boolean active)
    • setDBLogAppendStackTrace

      void setDBLogAppendStackTrace(boolean active)
    • isReadOnly

      boolean isReadOnly()
      Returns:
      true if the datasoure is read-only
    • getTablePrefix

      String getTablePrefix()
      Returns:
      the table prefix for all tables
    • translateToDataAccessException

      org.springframework.dao.DataAccessException translateToDataAccessException(SQLException e)
      Translates the given raw SQL exception into a Spring DataAccessException exactly like it would have been done when using Spring JdbcTemplate.
    • getJDBCInterceptor

      JDBCInterceptor getJDBCInterceptor()