Package akka.stream.actor
Interface RequestStrategy
-
- All Known Implementing Classes:
MaxInFlightRequestStrategy
,OneByOneRequestStrategy$
,WatermarkRequestStrategy
,ZeroRequestStrategy$
public interface RequestStrategy
AnActorSubscriber
defines aRequestStrategy
to control the stream back pressure.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
requestDemand(int remainingRequested)
Invoked by theActorSubscriber
after each incoming message to determine how many more elements to request from the stream.
-
-
-
Method Detail
-
requestDemand
int requestDemand(int remainingRequested)
Invoked by theActorSubscriber
after each incoming message to determine how many more elements to request from the stream.- Parameters:
remainingRequested
- current remaining number of elements that have been requested from upstream but not received yet- Returns:
- demand of more elements from the stream, returning 0 means that no more elements will be requested for now
-
-