Home Identifier Source
import Collector from '@esnet/pond/src/collector.js'
public class | source

Collector

Constructor Summary

Public Constructor
public

constructor(size: *, observer: *)

Method Summary

Public Methods
public

addEvent(event: *, cb: *)

Add an event, which will be assigned to a bucket

public

bucket(d: *): *

Gets the current bucket or returns a new one.

public

done()

Forces the current bucket to emit

public

onEmit(cb: *)

Public Constructors

public constructor(size: *, observer: *) source

Params:

NameTypeAttributeDescription
size *
observer *

Public Methods

public addEvent(event: *, cb: *) source

Add an event, which will be assigned to a bucket

Params:

NameTypeAttributeDescription
event *
cb *

public bucket(d: *): * source

Gets the current bucket or returns a new one.

If a new bucket is generated the result of the old bucket is emitted automatically.

Params:

NameTypeAttributeDescription
d *

Return:

*

public done() source

Forces the current bucket to emit

public onEmit(cb: *) source

Params:

NameTypeAttributeDescription
cb *