pub struct EventContractCache { /* private fields */ }Implementations§
Source§impl EventContractCache
impl EventContractCache
pub fn is_category_ready(&self) -> bool
pub fn has_competition_generation(&self, category_id: u32) -> bool
pub fn apply_category_response( &self, body: &[u8], app_lang: i32, ) -> Result<(), EventContractCacheError>
pub fn apply_competition_response( &self, category_id: u32, body: &[u8], app_lang: i32, ) -> Result<(), EventContractCacheError>
Source§impl EventContractCache
impl EventContractCache
pub fn apply_securities_response( &self, body: &[u8], app_lang: i32, ) -> Result<(), EventContractCacheError>
pub fn apply_extra_response( &self, body: &[u8], app_lang: i32, ) -> Result<(), EventContractCacheError>
Sourcepub fn apply_combo_extra_response_best_effort(
&self,
body: &[u8],
app_lang: i32,
) -> Result<(), EventContractCacheError>
pub fn apply_combo_extra_response_best_effort( &self, body: &[u8], app_lang: i32, ) -> Result<(), EventContractCacheError>
Applies a ComboList-triggered 21165 refresh with the frozen C++ row transaction semantics.
The outer protobuf/err_code is one response transaction: malformed
or failed responses publish nothing. Within a successful response,
rows are independent, zero/missing ids are skipped, and valid extra
rows publish even when their base 20106 row has not arrived yet. The
resulting set of accepted rows is published as one immutable
generation.
Ref: frozen C++ aec0f6cda1
NNBiz_Qot_EventContract.cpp:289-375.
pub fn apply_relation_response( &self, body: &[u8], ) -> Result<(), EventContractCacheError>
Sourcepub fn apply_relation_response_with_lang(
&self,
body: &[u8],
app_lang: i32,
) -> Result<(), EventContractCacheError>
pub fn apply_relation_response_with_lang( &self, body: &[u8], app_lang: i32, ) -> Result<(), EventContractCacheError>
Publishes relation ids and any nested detail metadata as one immutable
generation. need_detail=true relation replies are an authoritative
metadata source; the selected child must not require a second 20106.
Ref: frozen C++ aec0f6cda1
NNBiz_Qot_EventContract.cpp:125-171,235-286.
Source§impl EventContractCache
impl EventContractCache
pub fn mvc_rule(&self, mvc: &str) -> Option<EventContractMvcRule>
Sourcepub fn apply_mvc_response(
&self,
mvc: &str,
body: &[u8],
) -> Result<(), EventContractCacheError>
pub fn apply_mvc_response( &self, mvc: &str, body: &[u8], ) -> Result<(), EventContractCacheError>
Publishes one complete MVC rule only after the exact CMD21328 body has decoded and passed its business result.
Ref: frozen C++ aec0f6cda1
NNBiz_Qot_EventContractMVC.cpp:65-116: absent ret_code is success,
missing limits become zero, zero event ids are skipped, and the
deprecated yes-only list is ignored.
Sourcepub fn save_rfq_quote_at(
&self,
quote_id: &str,
legs: &[(u64, i32)],
combo_exchange: &str,
combo_origin_symbol: &str,
written_at: Instant,
)
pub fn save_rfq_quote_at( &self, quote_id: &str, legs: &[(u64, i32)], combo_exchange: &str, combo_origin_symbol: &str, written_at: Instant, )
Saves the RFQ identity required by the later combo-order consumer.
The value deliberately contains only local write time, original-order
(stock_id, pred_side) legs, and combo origin. Price, expiry, account,
and market are not part of the C++ owner.
Ref: frozen C++ aec0f6cda1
NNData_EventContractRfqQuote.h:34-43 and
NNData_EventContractRfqQuote.cpp:29-41.
pub fn save_rfq_quote( &self, quote_id: &str, legs: &[(u64, i32)], combo_exchange: &str, combo_origin_symbol: &str, )
pub fn rfq_quote_state( &self, quote_id: &str, ) -> Option<EventContractRfqQuoteState>
pub fn is_rfq_quote_valid_at(&self, quote_id: &str, now: Instant) -> bool
pub fn rfq_quote_matches(&self, quote_id: &str, legs: &[(u64, i32)]) -> bool
pub fn rfq_quote_combo_origin(&self, quote_id: &str) -> Option<(String, String)>
Sourcepub fn purge_rfq_quotes_at(&self, now: Instant) -> usize
pub fn purge_rfq_quotes_at(&self, now: Instant) -> usize
Removes entries whose local age is strictly greater than 60 seconds.
Ref: frozen C++ aec0f6cda1
NNData_EventContractRfqQuote.cpp:3-5,93-115. C++ owns one cache-level
timer rather than one timer per quote. Rust performs the same single
owner cleanup opportunistically on every save/read: under activity the
map stays bounded, while an idle map cannot grow; every observable read
first removes the same age > 60000ms entries.
Sourcepub fn subscription_security_info(
&self,
public_sec_key: &str,
) -> Option<CachedSecurityInfo>
pub fn subscription_security_info( &self, public_sec_key: &str, ) -> Option<CachedSecurityInfo>
Builds transient subscription facts from the EventContract metadata
owner without copying the row into StaticDataCache.
Ref: frozen C++ aec0f6cda1
INNBiz_Qot_EventContract.h:40-44 and
MktQotSubInstance.cpp:334-380: EventContract identities use public
market 101, backend market 35, and quote security type 17.
pub fn subscription_security_info_by_stock_id( &self, stock_id: u64, ) -> Option<CachedSecurityInfo>
Sourcepub fn publish_order_book(
&self,
stock_id: u64,
generation: u64,
book: EventContractOrderBook,
) -> bool
pub fn publish_order_book( &self, stock_id: u64, generation: u64, book: EventContractOrderBook, ) -> bool
Publishes one complete YES/NO order-book generation.
The four quadrants move together so readers cannot combine YES from one backend frame with NO from another. A delayed frame is rejected rather than overwriting newer data.
Sourcepub fn merge_order_book_side(
&self,
stock_id: u64,
generation: u64,
direction: i32,
bids: Vec<EventContractOrderBookLevel>,
asks: Vec<EventContractOrderBookLevel>,
) -> bool
pub fn merge_order_book_side( &self, stock_id: u64, generation: u64, direction: i32, bids: Vec<EventContractOrderBookLevel>, asks: Vec<EventContractOrderBookLevel>, ) -> bool
Merges one backend EventContract side into the four-quadrant public book. YES and NO arrive as separate CMD6212 bit=3/prob=1|2 frames, so each side owns an independent generation watermark.
Ref: frozen C++ aec0f6cda1
APIServer_Qot_EventContractPush.cpp: the public 3450 body is emitted
only after both YES and NO OrderBookYesNo caches are ready.
pub fn order_book_snapshot( &self, stock_id: u64, ) -> Option<Arc<EventContractOrderBookGeneration>>
Source§impl EventContractCache
impl EventContractCache
pub fn new() -> Arc<Self>
pub fn category_snapshot(&self) -> Arc<CategoryGeneration>
pub fn metadata_snapshot(&self) -> Arc<MetadataGeneration>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EventContractCache
impl !RefUnwindSafe for EventContractCache
impl Send for EventContractCache
impl Sync for EventContractCache
impl Unpin for EventContractCache
impl UnsafeUnpin for EventContractCache
impl UnwindSafe for EventContractCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more