Class AbstractConnectionPool

    • Constructor Detail

      • AbstractConnectionPool

        protected AbstractConnectionPool​(Destination destination,
                                         int maxConnections,
                                         Callback requester)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface ConnectionPool
        whether this ConnectionPool has no open connections
      • acquire

        public Connection acquire()
        Description copied from interface: ConnectionPool

        Returns an idle connection, if available, or schedules the opening of a new connection and returns null.

        Specified by:
        acquire in interface ConnectionPool
        an available connection, or null
      • tryCreate

        protected void tryCreate​(int maxPending)
      • onCreated

        protected abstract void onCreated​(Connection connection)
      • proceed

        protected void proceed()
      • activate

        protected abstract Connection activate()
      • acquired

        protected void acquired​(Connection connection)
      • idle

        protected boolean idle​(Connection connection,
                               boolean close)
      • released

        protected void released​(Connection connection)
      • removed

        protected void removed​(Connection connection)
      • close

        public void close()
        Description copied from interface: ConnectionPool
        Closes this ConnectionPool.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface
        Specified by:
        close in interface ConnectionPool
        See Also:
      • close

        protected void close​(java.util.Collection<Connection> connections)
      • dump

        public java.lang.String dump()
        Specified by:
        dump in interface Dumpable