rewrite Buffer as a GraphStage #21528

This commit is contained in:
Hawstein 2016-11-16 01:48:33 +08:00 committed by Johan Andrén
parent 88a6bdb059
commit 96a1d2a081
4 changed files with 66 additions and 60 deletions

View file

@ -1208,7 +1208,7 @@ trait FlowOps[+Out, +Mat] {
* @param size The size of the buffer in element count
* @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
*/
def buffer(size: Int, overflowStrategy: OverflowStrategy): Repr[Out] = andThen(Buffer(size, overflowStrategy))
def buffer(size: Int, overflowStrategy: OverflowStrategy): Repr[Out] = via(fusing.Buffer(size, overflowStrategy))
/**
* Generic transformation of a stream with a custom processing [[akka.stream.stage.Stage]].