Interface ClosableDataSource

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close the datasource, if necessary.
      void setIdleTimeout​(int idleTimeout)
      How long, in seconds, an idle connection is kept in the pool before it is removed.
      void setLoginTimeout​(int loginTimeout)
      How long, in seconds, to attempt to make a connection to the database.
      void setMaxPool​(int maxPool)
      The maximum number of pooled connections to retain.
      void setMaxSize​(int maxSize)
      The maximum number of connections that can be created.
      void setMinPool​(int minPool)
      The minimum number of pooled connections to retain.
      • Methods inherited from interface javax.sql.CommonDataSource

        createShardingKeyBuilder, getParentLogger
      • Methods inherited from interface javax.sql.DataSource

        createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLogWriter
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Method Detail

      • close

        void close()
        Close the datasource, if necessary.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • setIdleTimeout

        void setIdleTimeout​(int idleTimeout)
        How long, in seconds, an idle connection is kept in the pool before it is removed.
        Parameters:
        idleTimeout -
      • setLoginTimeout

        void setLoginTimeout​(int loginTimeout)
                      throws java.sql.SQLException
        How long, in seconds, to attempt to make a connection to the database.
        Specified by:
        setLoginTimeout in interface javax.sql.CommonDataSource
        Specified by:
        setLoginTimeout in interface javax.sql.DataSource
        Throws:
        java.sql.SQLException
      • setMinPool

        void setMinPool​(int minPool)
        The minimum number of pooled connections to retain.
        Parameters:
        minPool -
      • setMaxPool

        void setMaxPool​(int maxPool)
        The maximum number of pooled connections to retain.
        Parameters:
        maxPool -
      • setMaxSize

        void setMaxSize​(int maxSize)
        The maximum number of connections that can be created.
        Parameters:
        maxSize -