Class FixedFastChannelPoolImpl

    • Constructor Detail

      • FixedFastChannelPoolImpl

        public FixedFastChannelPoolImpl​(@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,
                                        int connectConcurrency)
      • FixedFastChannelPoolImpl

        public FixedFastChannelPoolImpl​(@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,
                                        int connectConcurrency)
      • FixedFastChannelPoolImpl

        public FixedFastChannelPoolImpl​(@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,
                                        int connectConcurrency,
                                        @Nonnull
                                        java.util.function.BooleanSupplier useQueueSizeForAcquiredChannelCount)
      • FixedFastChannelPoolImpl

        public FixedFastChannelPoolImpl​(@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,
                                        int connectConcurrency,
                                        @Nonnull
                                        java.util.function.BooleanSupplier useQueueSizeForAcquiredChannelCount)
    • Method Detail

      • handler

        public io.netty.channel.pool.ChannelPoolHandler handler()
        Description copied from class: FastSimpleChannelPool
        Returns the ChannelPoolHandler that will be notified for the different pool actions.
        Specified by:
        handler in interface ManagedChannelPool
        Overrides:
        handler in class FastSimpleChannelPool
        Returns:
        the ChannelPoolHandler that will be notified for the different pool actions
      • setMinConnections

        public void setMinConnections​(int minConnections)
      • setMinConnections

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

        public int getMinConnections()
      • onConnect

        protected void onConnect​(io.netty.channel.Channel ch,
                                 io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
        Overrides:
        onConnect in class FastSimpleChannelPool
      • connectChannel

        protected io.netty.util.concurrent.Future<io.netty.channel.Channel> connectChannel​(io.netty.bootstrap.Bootstrap bs,
                                                                                           io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
        Description copied from class: FastFixedChannelPool
        Initiate establishing a new connection with the provided bootstrap. This implementation attempts to not exceed a preset number of max connections by storing deferred connections that would have caused the number of connections to be exceeded in the _pendingConnect queue. As connections are established, they are added to _channelGroup.
        Overrides:
        connectChannel in class FastFixedChannelPool
        Parameters:
        bs - Channel Bootstrap
        promise - Promise to complete with result of Bootstrap connect
        Returns:
        the promise
      • connectChannel0

        protected io.netty.util.concurrent.Future<io.netty.channel.Channel> connectChannel0​(io.netty.bootstrap.Bootstrap bs,
                                                                                            io.netty.util.concurrent.Promise<io.netty.channel.Channel> promise)
      • 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 FastFixedChannelPool
      • 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 FastFixedChannelPool
      • 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 FastFixedChannelPool
      • 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)