Class AMQPPerformativeEnvelopePool<E extends PerformativeEnvelope<Performative>>

  • Type Parameters:
    E - The type of Protocol Performative to pool incoming or outgoing.

    public class AMQPPerformativeEnvelopePool<E extends PerformativeEnvelope<Performative>>
    extends java.lang.Object
    Pool of PerformativeEnvelope instances used to reduce allocations on incoming performatives.
    • Field Detail

      • DEFAULT_MAX_POOL_SIZE

        public static final int DEFAULT_MAX_POOL_SIZE
        The default maximum pool size to use if not otherwise configured.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AMQPPerformativeEnvelopePool

        public AMQPPerformativeEnvelopePool​(java.util.function.Function<AMQPPerformativeEnvelopePool<E>,​E> envelopeBuilder)
        Create a new envelope pool using the default pool size.
        Parameters:
        envelopeBuilder - The builder that will provide new envelope instances when the pool is empty.
      • AMQPPerformativeEnvelopePool

        public AMQPPerformativeEnvelopePool​(java.util.function.Function<AMQPPerformativeEnvelopePool<E>,​E> envelopeBuilder,
                                            int maxPoolSize)
        Create a new envelope pool using the default pool size.
        Parameters:
        envelopeBuilder - The builder that will provide new envelope instances when the pool is empty.
        maxPoolSize - The maximum number of envelopes to hold in the pool at any given time.