Class NewHostConnectionPool$


  • public class NewHostConnectionPool$
    extends java.lang.Object
    Internal API

    New host connection pool implementation.

    Backpressure logic of the external interface:

    * pool pulls if there's a free slot * pool buffers outgoing response in a slot and registers them for becoming dispatchable. When a response is pulled a waiting slot is notified and the response is then dispatched.

    The implementation is split up into this class which does all the stream-based wiring. It contains a vector of slots that contain the mutable slot state for every slot.

    The actual state machine logic is handled in separate SlotState subclasses that interface with the logic through the clean SlotContext interface.