Class FixedChannelPoolImpl

    • Constructor Detail

      • FixedChannelPoolImpl

        public FixedChannelPoolImpl​(@Nonnull
                                    io.netty.bootstrap.Bootstrap bootstrap,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelPoolHandler handler,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelHealthChecker healthCheck,
                                    @Nonnull
                                    io.netty.channel.pool.FixedChannelPool.AcquireTimeoutAction action,
                                    long acquireTimeoutMillis,
                                    @Nonnull
                                    java.util.function.IntSupplier minConnections,
                                    int maxConnections,
                                    int maxPendingAcquires,
                                    boolean releaseHealthCheck,
                                    boolean lastRecentUsed)
      • FixedChannelPoolImpl

        public FixedChannelPoolImpl​(@Nonnull
                                    io.netty.bootstrap.Bootstrap bootstrap,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelPoolHandler handler,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelHealthChecker healthCheck,
                                    @Nonnull
                                    io.netty.channel.pool.FixedChannelPool.AcquireTimeoutAction action,
                                    long acquireTimeoutMillis,
                                    int minConnections,
                                    int maxConnections,
                                    int maxPendingAcquires,
                                    boolean releaseHealthCheck,
                                    boolean lastRecentUsed)
      • FixedChannelPoolImpl

        public FixedChannelPoolImpl​(@Nonnull
                                    io.netty.bootstrap.Bootstrap bootstrap,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelPoolHandler handler,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelHealthChecker healthCheck,
                                    @Nonnull
                                    io.netty.channel.pool.FixedChannelPool.AcquireTimeoutAction action,
                                    long acquireTimeoutMillis,
                                    int minConnections,
                                    int maxConnections,
                                    int maxPendingAcquires,
                                    boolean releaseHealthCheck,
                                    boolean lastRecentUsed,
                                    @Nonnull
                                    java.util.function.BooleanSupplier useQueueSizeForAcquiredChannelCount)
      • FixedChannelPoolImpl

        public FixedChannelPoolImpl​(@Nonnull
                                    io.netty.bootstrap.Bootstrap bootstrap,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelPoolHandler handler,
                                    @Nonnull
                                    io.netty.channel.pool.ChannelHealthChecker healthCheck,
                                    @Nonnull
                                    io.netty.channel.pool.FixedChannelPool.AcquireTimeoutAction action,
                                    long acquireTimeoutMillis,
                                    @Nonnull
                                    java.util.function.IntSupplier minConnections,
                                    int maxConnections,
                                    int maxPendingAcquires,
                                    boolean releaseHealthCheck,
                                    boolean lastRecentUsed,
                                    @Nonnull
                                    java.util.function.BooleanSupplier useQueueSizeForAcquiredChannelCount)
    • Method Detail

      • setMinConnections

        public void setMinConnections​(int minConnections)
      • setMinConnections

        public void setMinConnections​(@Nonnull
                                      java.util.function.IntSupplier minConnections)
      • getMinConnections

        public int getMinConnections()
      • connectChannel0

        protected io.netty.channel.ChannelFuture connectChannel0​(io.netty.bootstrap.Bootstrap bs)
      • connectChannel

        protected io.netty.channel.ChannelFuture connectChannel​(io.netty.bootstrap.Bootstrap bs)
        Description copied from class: EspressoSimpleChannelPool
        Bootstrap a new Channel. The default implementation uses Bootstrap.connect(), sub-classes may override this.

        The Bootstrap that is passed in here is cloned via Bootstrap.clone(), so it is safe to modify.

        Overrides:
        connectChannel in class EspressoSimpleChannelPool
      • acquire

        public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
        Specified by:
        acquire in interface io.netty.channel.pool.ChannelPool
        Overrides:
        acquire in class EspressoFixedChannelPool
      • release

        public io.netty.util.concurrent.Future<java.lang.Void> release​(io.netty.channel.Channel channel,
                                                                       io.netty.util.concurrent.Promise<java.lang.Void> promise)
        Specified by:
        release in interface io.netty.channel.pool.ChannelPool
        Overrides:
        release in class EspressoFixedChannelPool
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface io.netty.channel.pool.ChannelPool
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class EspressoFixedChannelPool
      • closeFuture

        public final io.netty.util.concurrent.Future<java.lang.Void> closeFuture()
        Specified by:
        closeFuture in interface ManagedChannelPool
      • notifyGrowFailure

        protected void notifyGrowFailure​(java.net.SocketAddress remoteAddress,
                                         java.lang.Throwable cause)