in orderbook-core/src/main/java/com/epam/deltix/orderbook/core/impl/CompactL2SingleExchangeQuoteProcessor.java [96:127]
public boolean processL2EntryUpdate(final PackageHeaderInfo pck, final L2EntryUpdateInfo msg) {
final QuoteSide side = msg.getSide();
final int level = msg.getLevel();
@Alphanumeric final long exchangeId = msg.getExchangeId();
final BookUpdateAction action = msg.getAction();
final Option<MutableExchange<Quote, CompactL2Processor<Quote>>> exchange = getExchanges().getById(exchangeId);
if (!exchange.hasValue()) {
return false;
}
if (exchange.get().getProcessor().isWaitingForSnapshot()) {
return false;
}
final CompactL2MarketSide<Quote> marketSide = exchange.get().getProcessor().getMarketSide(side);
if (marketSide.isInvalidUpdate(action, level, msg.getPrice(), msg.getSize(), exchangeId)) {
if (validationOptions.isQuoteUpdate()) {
clear();
eventHandler.onBroken();
return false;
}
return true; // skip invalid update
}
if (action == BookUpdateAction.DELETE) {
marketSide.remove(level);
} else if (action == BookUpdateAction.UPDATE) {
marketSide.set(level, msg.getPrice(), msg.getSize());
}
return true;
}