Interface IOrderBookUpdater<TBook, S, D>
Applies venue snapshot/diff data to a maintained TBook.
S is the snapshot data type and D
the diff data type.
public interface IOrderBookUpdater<TBook, S, D> where TBook : IOrderBook
Type Parameters
TBookMaintained book type.
SSnapshot data type.
DDiff data type.
Remarks
The updater is stateless: all live state (levels, update id, lifecycle) lives on the book, so one updater instance can serve many books.
Methods
ApplyDiff(TBook, D)
Apply one diff to book.
OrderBookUpdateStatus ApplyDiff(TBook book, D diff)
Parameters
bookTBookBook to mutate.
diffDDiff data.
Returns
- OrderBookUpdateStatus
The outcome of the application.
ApplySnapshot(TBook, S)
Bootstrap (or re-bootstrap) book from a snapshot.
void ApplySnapshot(TBook book, S snapshot)
Parameters
bookTBookBook to populate.
snapshotSSnapshot data.