Class MultiplexConnectionPool

All Implemented Interfaces:
ConnectionPool, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle, Sweeper.Sweepable
Direct Known Subclasses:
RandomConnectionPool, RoundRobinConnectionPool

@ManagedObject public class MultiplexConnectionPool extends AbstractConnectionPool
  • Constructor Details

    • MultiplexConnectionPool

      public MultiplexConnectionPool(Destination destination, int maxConnections, int initialMaxMultiplex)
    • MultiplexConnectionPool

      protected MultiplexConnectionPool(Destination destination, Pool.Factory<Connection> poolFactory, int initialMaxMultiplex)
  • Method Details

    • newMaxMultiplexer

      public static ToIntFunction<Connection> newMaxMultiplexer(int defaultMaxMultiplex)

      Returns a function that computes the max multiplex value for a given Connection, if possible, otherwise returns the given defaultMaxMultiplex value.

      Parameters:
      defaultMaxMultiplex - the default max multiplex value
      Returns:
      a function that computes the max multiplex value for a connection
    • getInitialMaxMultiplex

      @ManagedAttribute("The initial multiplexing factor of connections") public int getInitialMaxMultiplex()
      Overrides:
      getInitialMaxMultiplex in class AbstractConnectionPool
    • setInitialMaxMultiplex

      public void setInitialMaxMultiplex(int initialMaxMultiplex)
      Overrides:
      setInitialMaxMultiplex in class AbstractConnectionPool