Table of Contents

Class PublishGate

Namespace
Virtufin.Worker.DevKit
Assembly
Virtufin.Worker.DevKit.dll

Decides whether a symbol's changed event is due, given its publishintervalms. One instance per worker; the fold runs regardless, and the announcement that does go out carries the newest value.

public sealed class PublishGate
Inheritance
PublishGate
Inherited Members

Constructors

PublishGate(TimeProvider?)

public PublishGate(TimeProvider? clock = null)

Parameters

clock TimeProvider

Methods

IsDue(string, TimeSpan)

Whether symbol is due; always when interval is zero or negative.

public bool IsDue(string symbol, TimeSpan interval)

Parameters

symbol string
interval TimeSpan

Returns

bool

MarkPublished(string)

Record that symbol's value was announced now.

public void MarkPublished(string symbol)

Parameters

symbol string