Class NewHostConnectionPool
java.lang.Object
org.apache.pekko.http.impl.engine.client.pool.NewHostConnectionPool
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.pekko.stream.scaladsl.Flow<PoolFlow.RequestContext,
PoolFlow.ResponseContext, org.apache.pekko.NotUsed> apply
(org.apache.pekko.stream.scaladsl.Flow<HttpRequest, HttpResponse, scala.concurrent.Future<Http.OutgoingConnection>> connectionFlow, ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log)
-
Constructor Details
-
NewHostConnectionPool
public NewHostConnectionPool()
-
-
Method Details
-
apply
public static org.apache.pekko.stream.scaladsl.Flow<PoolFlow.RequestContext,PoolFlow.ResponseContext, applyorg.apache.pekko.NotUsed> (org.apache.pekko.stream.scaladsl.Flow<HttpRequest, HttpResponse, scala.concurrent.Future<Http.OutgoingConnection>> connectionFlow, ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log)
-