Class DuplexConnectionPool

    • Constructor Detail

      • DuplexConnectionPool

        public DuplexConnectionPool​(Destination destination,
                                    int maxConnections,
                                    org.eclipse.jetty.util.Callback requester)
    • Method Detail

      • lock

        protected void lock()
      • unlock

        protected void unlock()
      • getIdleConnectionCount

        @ManagedAttribute(value="The number of idle connections",
                          readonly=true)
        public int getIdleConnectionCount()
      • getActiveConnectionCount

        @ManagedAttribute(value="The number of active connections",
                          readonly=true)
        public int getActiveConnectionCount()
      • isActive

        public boolean isActive​(Connection connection)
        Specified by:
        isActive in interface ConnectionPool
        Parameters:
        connection - the connection to test
        Returns:
        whether the given connection is currently in use
      • release

        public boolean release​(Connection connection)
        Description copied from interface: ConnectionPool

        Returns the given connection, previously obtained via ConnectionPool.acquire(), back to this ConnectionPool.

        Specified by:
        release in interface ConnectionPool
        Parameters:
        connection - the connection to release
        Returns:
        true if the connection has been released, false if the connection should be closed
      • deactivate

        protected boolean deactivate​(Connection connection)
      • remove

        public boolean remove​(Connection connection)
        Description copied from interface: ConnectionPool

        Removes the given connection from this ConnectionPool.

        Specified by:
        remove in interface ConnectionPool
        Parameters:
        connection - the connection to remove
        Returns:
        true if the connection was removed from this ConnectionPool
      • remove

        protected boolean remove​(Connection connection,
                                 boolean force)
      • sweep

        public boolean sweep()
        Specified by:
        sweep in interface org.eclipse.jetty.util.thread.Sweeper.Sweepable