Interface ChannelPoolManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static io.netty.util.AttributeKey<java.lang.Boolean> FAILED_HEALTH_CHECK  
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(io.netty.channel.EventLoop eventLoop, java.lang.String hostNameAndPort, java.lang.String queueName, QOS qos)
      Acquire a channel from the pool.
      io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(java.lang.String hostNameAndPort, java.lang.String queueName, QOS qos)
      Acquire a channel from the pool.
      io.netty.util.concurrent.Future<java.lang.Void> close​(java.lang.String hostNameAndPort)
      Close the connection pool to the specified host and port.
      int executorCount()
      Deprecated.
      due to confusing name.
      default io.netty.util.concurrent.Future<java.lang.Void> open​(java.lang.String hostNameAndPort)
      Open the connection pool to the specified host and port.
      io.netty.util.concurrent.Future<java.lang.Void> release​(io.netty.channel.Channel channel)
      Release the channel to the pool.
      default int subpoolCount()
      The number of subpool threads used per pool by this class.
    • Field Detail

      • FAILED_HEALTH_CHECK

        static final io.netty.util.AttributeKey<java.lang.Boolean> FAILED_HEALTH_CHECK
    • Method Detail

      • executorCount

        @Deprecated
        int executorCount()
        Deprecated.
        due to confusing name. Use subpoolCount()
        The number of threads in the eventloopgroup used by this class.
        Returns:
        thread count
      • subpoolCount

        default int subpoolCount()
        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.
        Returns:
        thread count
      • acquire

        @CheckReturnValue
        @Nonnull
        io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(@Nonnull
                                                                          java.lang.String hostNameAndPort,
                                                                          @Nonnull
                                                                          java.lang.String queueName,
                                                                          @Nonnull
                                                                          QOS qos)
        Acquire a channel from the pool.
        Parameters:
        hostNameAndPort - host name and port
        queueName - queue name
        qos - priority
        Returns:
        future for acquired channel
      • acquire

        @CheckReturnValue
        @Nonnull
        io.netty.util.concurrent.Future<io.netty.channel.Channel> acquire​(@Nonnull
                                                                          io.netty.channel.EventLoop eventLoop,
                                                                          @Nonnull
                                                                          java.lang.String hostNameAndPort,
                                                                          @Nonnull
                                                                          java.lang.String queueName,
                                                                          @Nonnull
                                                                          QOS qos)
        Acquire a channel from the pool.
        Parameters:
        hostNameAndPort - host name and port
        queueName - queue name
        qos - priority
        Returns:
        future for acquired channel
      • release

        @Nonnull
        io.netty.util.concurrent.Future<java.lang.Void> release​(@Nonnull
                                                                io.netty.channel.Channel channel)
        Release the channel to the pool.
        Parameters:
        channel - channel
        Returns:
        future which is completed when done
      • open

        @Nonnull
        default io.netty.util.concurrent.Future<java.lang.Void> open​(@Nonnull
                                                                     java.lang.String hostNameAndPort)
        Open the connection pool to the specified host and port. The default implementation simply acquires a channel from the pool and then immediately releases it.
        Parameters:
        hostNameAndPort - Host and port string
        Returns:
        future which is completed when done
      • close

        @Nonnull
        io.netty.util.concurrent.Future<java.lang.Void> close​(@Nonnull
                                                              java.lang.String hostNameAndPort)
        Close the connection pool to the specified host and port.
        Parameters:
        hostNameAndPort - Host and port string
        Returns:
        future which is completed when done