Class ChannelPoolManagerImpl

    • Field Detail

      • DEFAULT_DB_QUEUE

        public static final java.lang.String DEFAULT_DB_QUEUE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ChannelPoolManagerImpl

        public ChannelPoolManagerImpl​(@Nonnull
                                      E eventLoopGroup,
                                      @Nonnull
                                      ChannelPoolFactory channelPoolFactory,
                                      @Nonnull
                                      ChannelPoolResolver channelPoolResolver,
                                      @Nonnegative
                                      int maxWaitersPerPool)
      • ChannelPoolManagerImpl

        public ChannelPoolManagerImpl​(@Nonnull
                                      E eventLoopGroup,
                                      @Nonnull
                                      ChannelPoolFactory channelPoolFactory,
                                      @Nonnull
                                      ChannelPoolResolver channelPoolResolver,
                                      @Nonnegative
                                      int maxWaitersPerPool,
                                      boolean useH2GlobalPool,
                                      boolean createConnectionsOnWorkerGroup,
                                      boolean enableSimpleAcquire)
      • ChannelPoolManagerImpl

        public ChannelPoolManagerImpl​(@Nonnull
                                      E eventLoopGroup,
                                      @Nonnull
                                      ChannelPoolFactory channelPoolFactory,
                                      @Nonnull
                                      ChannelPoolResolver channelPoolResolver,
                                      @Nonnegative
                                      int maxWaitersPerPool,
                                      boolean useH2GlobalPool,
                                      boolean createConnectionsOnWorkerGroup,
                                      boolean enableSimpleAcquire,
                                      int pingIntervalSeconds)
    • Method Detail

      • executorCount

        @Deprecated
        public int executorCount()
        Deprecated.
        Description copied from interface: ChannelPoolManager
        The number of threads in the eventloopgroup used by this class.
        Specified by:
        executorCount in interface ChannelPoolManager
        Returns:
        thread count
      • startPeriodicPing

        public void startPeriodicPing()
      • sendPing

        public void sendPing()
      • enablePeriodicPing

        public boolean enablePeriodicPing()
      • getPools

        public java.util.Collection<com.linkedin.alpini.netty4.pool.ChannelPoolManagerImpl.Pool> getPools()
      • stopPeriodicPing

        public void stopPeriodicPing()
      • subpoolCount

        public int subpoolCount()
        Description copied from interface: ChannelPoolManager
        The number of subpool threads used per pool by this class. Must be less than or equal to the number of threads in the eventloopgroup. Must be greater than zero.
        Specified by:
        subpoolCount in interface ChannelPoolManager
        Returns:
        thread count
      • createHostAcquireCallTracker

        @Nonnull
        protected CallTracker createHostAcquireCallTracker()
      • createHostBusyCallTracker

        @Nonnull
        protected CallTracker createHostBusyCallTracker()
      • createQueueAcquireCallTracker

        @Nonnull
        @Deprecated
        protected CallTracker createQueueAcquireCallTracker()
        Deprecated.
      • createQueueBusyCallTracker

        @Nonnull
        @Deprecated
        protected CallTracker createQueueBusyCallTracker()
        Deprecated.
      • createUnresolved

        @Nonnull
        protected java.net.InetSocketAddress createUnresolved​(@Nonnull
                                                              java.lang.String hostAndPort)
      • createUnresolved

        @Nonnull
        protected java.net.InetSocketAddress createUnresolved​(@Nonnull
                                                              java.net.InetSocketAddress inetSocketAddress)
      • close

        @Nonnull
        public io.netty.util.concurrent.Future<java.lang.Void> close​(@Nonnull
                                                                     java.lang.String hostName)
        Description copied from interface: ChannelPoolManager
        Close the connection pool to the specified host and port.
        Specified by:
        close in interface ChannelPoolManager
        Parameters:
        hostName - Host and port string
        Returns:
        future which is completed when done
      • localThreadGroup

        protected io.netty.util.concurrent.Future<io.netty.channel.EventLoopGroup> localThreadGroup()
      • localThreadGroup

        protected io.netty.util.concurrent.Future<io.netty.channel.EventLoopGroup> localThreadGroup​(@Nonnull
                                                                                                    io.netty.channel.EventLoop eventLoop)
      • acquire

        @Nonnull
        public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(@Nonnull
                                                                                 java.lang.String hostName,
                                                                                 @Nonnull
                                                                                 java.lang.String queueName,
                                                                                 @Nonnull
                                                                                 QOS qos)
        Description copied from interface: ChannelPoolManager
        Acquire a channel from the pool.
        Specified by:
        acquire in interface ChannelPoolManager
        Parameters:
        hostName - host name and port
        queueName - queue name
        qos - priority
        Returns:
        future for acquired channel
      • acquire

        @Nonnull
        public io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(@Nonnull
                                                                                 io.netty.channel.EventLoop eventLoop,
                                                                                 @Nonnull
                                                                                 java.lang.String hostName,
                                                                                 @Nonnull
                                                                                 java.lang.String queueName,
                                                                                 @Nonnull
                                                                                 QOS qos)
        Description copied from interface: ChannelPoolManager
        Acquire a channel from the pool.
        Specified by:
        acquire in interface ChannelPoolManager
        hostName - host name and port
        queueName - queue name
        qos - priority
        Returns:
        future for acquired channel
      • release

        @Nonnull
        public io.netty.util.concurrent.Future<java.lang.Void> release​(@Nonnull
                                                                       io.netty.channel.Channel channel)
        Description copied from interface: ChannelPoolManager
        Release the channel to the pool.
        Specified by:
        release in interface ChannelPoolManager
        Parameters:
        channel - channel
        Returns:
        future which is completed when done