Class AbstractNIOConnPool<T,​C,​E extends PoolEntry<T,​C>>

    • Method Detail

      • isShutdown

        public boolean isShutdown()
      • shutdown

        public void shutdown​(long waitMs)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • lease

        public java.util.concurrent.Future<E> lease​(T route,
                                                    java.lang.Object state,
                                                    long connectTimeout,
                                                    java.util.concurrent.TimeUnit tunit,
                                                    FutureCallback<E> callback)
      • lease

        public java.util.concurrent.Future<E> lease​(T route,
                                                    java.lang.Object state,
                                                    long connectTimeout,
                                                    long leaseTimeout,
                                                    java.util.concurrent.TimeUnit tunit,
                                                    FutureCallback<E> callback)
        Since:
        4.3
      • lease

        public java.util.concurrent.Future<E> lease​(T route,
                                                    java.lang.Object state,
                                                    FutureCallback<E> callback)
        Description copied from interface: ConnPool
        Attempts to lease a connection for the given route and with the given state from the pool.
        Specified by:
        lease in interface ConnPool<T,​C>
        Parameters:
        route - route of the connection.
        state - arbitrary object that represents a particular state (usually a security principal or a unique token identifying the user whose credentials have been used while establishing the connection). May be null.
        callback - operation completion callback.
        Returns:
        future for a leased pool entry.
      • lease

        public java.util.concurrent.Future<E> lease​(T route,
                                                    java.lang.Object state)
      • release

        public void release​(E entry,
                            boolean reusable)
        Description copied from interface: ConnPool
        Releases the pool entry back to the pool.
        Specified by:
        release in interface ConnPool<T,​C>
        Parameters:
        entry - pool entry leased from the pool
        reusable - flag indicating whether or not the released connection is in a consistent state and is safe for further use.
      • validatePendingRequests

        public void validatePendingRequests()
      • getRoutes

        public java.util.Set<T> getRoutes()
        Returns snapshot of all knows routes
        Since:
        4.4
      • closeIdle

        public void closeIdle​(long idletime,
                              java.util.concurrent.TimeUnit tunit)
      • closeExpired

        public void closeExpired()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object