Yaaf.FSharp.Helper


BatchProcessingAgent<'T>

Defined in Yaaf.FSharp.Helper.dll.

Agent that can be used to implement batch processing. It creates groups of messages (added using the Enqueue method) and emits them using the BatchProduced event. A group is produced when it reaches the maximal size or after the timeout elapses.

Constructors

ConstructorDescription
new(batchSize, timeout)
Signature: (batchSize:int * timeout:int) -> BatchProcessingAgent<'T>

Instance members

Instance memberDescription
add_BatchProduced(arg1)
Signature: (Handler<'T []>) -> unit

The event is triggered when a group of messages is collected. The group is not empty, but may not be of the specified maximal size (when the timeout elapses before enough messages is collected)

BatchProduced
Signature: IEvent<'T []>

The event is triggered when a group of messages is collected. The group is not empty, but may not be of the specified maximal size (when the timeout elapses before enough messages is collected)

Enqueue(v)
Signature: v:'T -> unit

Sends new message to the agent

remove_BatchProduced(arg1)
Signature: (Handler<'T []>) -> unit

The event is triggered when a group of messages is collected. The group is not empty, but may not be of the specified maximal size (when the timeout elapses before enough messages is collected)

Fork me on GitHub