Class PoolableConnection

java.lang.Object
dev.king.universal.wrapper.mysql.PoolableConnection
All Implemented Interfaces:
PoolableProvider
Direct Known Subclasses:
MysqlProvider

public class PoolableConnection
extends java.lang.Object
implements PoolableProvider
  • Constructor Summary

    Constructors 
    Constructor Description
    PoolableConnection()  
  • Method Summary

    Modifier and Type Method Description
    com.zaxxer.hikari.HikariDataSource obtainDataSource​(@NonNull UniversalCredential credentials, int maxConnections)
    Get connection pool from hikari that offers more availability

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • obtainDataSource

      public com.zaxxer.hikari.HikariDataSource obtainDataSource​(@NonNull @NonNull UniversalCredential credentials, int maxConnections) throws java.sql.SQLException
      Get connection pool from hikari that offers more availability
      Specified by:
      obtainDataSource in interface PoolableProvider
      Parameters:
      credentials - instance of UniversalCredential to login into mysql
      maxConnections - passed in MysqlProvider constructor
      Returns:
      data source
      Throws:
      java.sql.SQLException - if driver class doesn't exists