Package akka.stream
Class OverflowStrategy
- java.lang.Object
-
- akka.stream.DelayOverflowStrategy
-
- akka.stream.OverflowStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Serializable
- Direct Known Subclasses:
OverflowStrategies.Backpressure
,OverflowStrategies.DropBuffer
,OverflowStrategies.DropHead
,OverflowStrategies.DropNew
,OverflowStrategies.DropTail
,OverflowStrategies.Fail
public abstract class OverflowStrategy extends DelayOverflowStrategy
INTERNAL API- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OverflowStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static OverflowStrategy
backpressure()
If the buffer is full when a new element is available this strategy backpressures the upstream publisher until space becomes available in the buffer.static OverflowStrategy
dropBuffer()
If the buffer is full when a new element arrives, drops all the buffered elements to make space for the new element.static OverflowStrategy
dropHead()
static OverflowStrategy
dropNew()
If the buffer is full when a new element arrives, drops the new element.static OverflowStrategy
dropTail()
If the buffer is full when a new element arrives, drops the youngest element from the buffer to make space for the new element.static OverflowStrategy
fail()
If the buffer is full when a new element is available this strategy completes the stream with failure.abstract Logging.LogLevel
logLevel()
abstract OverflowStrategy
withLogLevel​(Logging.LogLevel logLevel)
-
Methods inherited from class akka.stream.DelayOverflowStrategy
emitEarly, isBackpressure
-
-
-
-
Method Detail
-
dropHead
public static OverflowStrategy dropHead()
-
dropTail
public static OverflowStrategy dropTail()
If the buffer is full when a new element arrives, drops the youngest element from the buffer to make space for the new element.- Returns:
- (undocumented)
-
dropBuffer
public static OverflowStrategy dropBuffer()
If the buffer is full when a new element arrives, drops all the buffered elements to make space for the new element.- Returns:
- (undocumented)
-
dropNew
public static OverflowStrategy dropNew()
If the buffer is full when a new element arrives, drops the new element.- Returns:
- (undocumented)
-
backpressure
public static OverflowStrategy backpressure()
If the buffer is full when a new element is available this strategy backpressures the upstream publisher until space becomes available in the buffer.- Returns:
- (undocumented)
-
fail
public static OverflowStrategy fail()
If the buffer is full when a new element is available this strategy completes the stream with failure.- Returns:
- (undocumented)
-
logLevel
public abstract Logging.LogLevel logLevel()
-
withLogLevel
public abstract OverflowStrategy withLogLevel​(Logging.LogLevel logLevel)
-
-