The Window operator is similar to Buffer but collects items into separate Observables rather than into data structures before reemitting them.
RxCpp implements two variants of Buffer:
buffer(count)
buffer(count, skip)
In RxGroovy there are several variants of Buffer:
buffer(count)
buffer(count, skip)
buffer(bufferClosingSelector)
buffer(boundary
[, initialCapacity
])
buffer(bufferOpenings, bufferClosingSelector)
buffer(timespan, unit
[, scheduler
])
buffer(timespan, unit, count
[, scheduler
])
buffer(timespan, timeshift, unit
[, scheduler
])
You can use the Buffer operator to implement backpressure (that is, to cope with an Observable that may produce items too quickly for its observer to consume).
In RxJava there are several variants of Buffer:
buffer(count)
buffer(count, skip)
buffer(bufferClosingSelector)
buffer(boundary)
buffer(bufferOpenings, bufferClosingSelector)
buffer(timespan, unit
[, scheduler
])
buffer(timespan, unit, count
[, scheduler
])
buffer(timespan, timeshift, unit
[, scheduler
])
You can use the Buffer operator to implement backpressure (that is, to cope with an Observable that may produce items too quickly for its observer to consume).
RxJS has four Buffer operators — buffer
,
bufferWithCount
, bufferWithTime
, and
bufferWithTimeOrCount
— each of which has variants that have different
ways of governing which source Observable items are emitted as part of which buffers.
buffer(bufferBoundaries)
buffer(bufferClosingSelector)
buffer(bufferOpenings,bufferClosingSelector)
buffer
is found in each of the following distributions:
rx.all.js
rx.all.compat.js
rx.coincidence.js
buffer
requires one of the following distributions:
rx.js
rx.compat.js
rx.lite.js
rx.lite.compat.js
bufferWithCount(count)
bufferWithCount(count, skip)
bufferWithCount
is found in each of the following distributions:
rx.js
rx.compat.js
rx.all.js
rx.all.compat.js
rx.lite.extras.js
bufferWithTime(timeSpan)
bufferWithTime(timeSpan, timeShift)
bufferWithTimeOrCount(timeSpan, count)
bufferWithTime
and bufferWithTimeOrCount
are found in each of the
following distributions:
rx.all.js
rx.all.compat.js
rx.time.js
bufferWithTime
and bufferWithTimeOrCount
require one of the
following distributions:
rx.time.js
requires rx.js
or rx.compat.js
rx.lite.js
or rx.lite.compat.js
In RxKotlin there are several variants of Buffer:
buffer(count)
buffer(count, skip)
buffer(bufferClosingSelector)
buffer(boundary)
buffer(bufferOpenings, bufferClosingSelector)
buffer(timespan, unit
[, scheduler
])
buffer(timespan, unit, count
[, scheduler
])
buffer(timespan, timeshift, unit
[, scheduler
])
In Rx.NET there are several variants of Buffer. For each variety you can either pass in the source Observable as the first parameter, or you can call it as an instance method of the source Observable (in which case you can omit that parameter):
Buffer(count)
Buffer(count, skip)
Buffer(bufferClosingSelector)
Buffer(bufferOpenings,bufferClosingSelector)
Buffer(timeSpan)
Buffer(timeSpan, count)
Buffer(timeSpan, timeShift)
RxPY has several Buffer variants: buffer
,
buffer_with_count
, buffer_with_time
, and
buffer_with_time_or_count
. For each of these variants there are optional
parameters that change the behavior of the operator. As always in RxPY, when an operator may
take more than one optional parameter, be sure to name the parameter in the parameter list
when you call the operator so as to avoid ambiguity.
buffer(buffer_openings)
buffer(closing_selector)
buffer_with_count(count)
buffer_with_count(count, skip)
buffer_with_time(timespan)
buffer_with_time(timespan, timeshift)
buffer_with_time_or_count(timespan, count)
Rx.rb has three variants of the Buffer operator:
buffer_with_count(count)
buffer_with_count(count,skip)
buffer_with_time(timespan)
RxScala has two varieties of Buffer —
slidingBuffer
and tumblingBuffer
— each of which has variants
with different ways of assembling the buffers they emit:
slidingBuffer(count, skip)
slidingBuffer(timespan, timeshift)
slidingBuffer(openings, closings)
tumblingBuffer(count)
tumblingBuffer(boundary)
tumblingBuffer(timespan)
tumblingBuffer(timespan, count)
TBD