Type of items to be chunked
Creates a new Chunker instance
Type of items to be chunked
Chunker options
number of pending items requiring that writer
be called
user-defined size before which writer
should be called
function that returns user-defined size of an item
function that writes the pending items when sizeLimit
or countLimit
would be exceeded.
This is not a mapper
as it does not return a result at all.
If the results need to be passed along, add them to an IterableQueueMapper
for example.
Private
Readonly
_backgroundPrivate
Readonly
_errorsPrivate
Readonly
_iterablePrivate
_pendingPrivate
_pendingPrivate
Readonly
_writerAccumulated errors from background flushes
Number of items pending
Sum of the user-defined size of all pending items
Private
flushGenerated using TypeDoc
Collects items up to
countLimit
, callingwriter
beforesizeLimit
would be exceeded.Remarks
Always call onIdle when done to ensure that the last
writer
call is made.