Commit 40bf7f0e authored by Andrew Smith's avatar Andrew Smith Committed by Facebook GitHub Bot

FanoutChannel: Change falcon code to use FanoutChannel's custom context

Summary: This diff changes the users of FanoutChannel to use the context functionality added in the previous diff. It includes a new helper class in falcon/proxy called ProxyNotificationFanoutChannel, which handles updating the current version and sending an initial NewSubscription to new subscribers with that version. This diff then changes ProxyCache, ProxyProdEntity, OverriddenBlobEntity, and OverriddenMapEntity to use ProxyNotificationFanoutChannel. (Previously, the logic in ProxyNotificationFanoutChannel was duplicated in all 4 of those classes.)

Reviewed By: aary

Differential Revision: D30889895

fbshipit-source-id: 39c9167f2bc6cc51e0b089eb5382faa498ffcb89
parent af581bd8
......@@ -68,7 +68,7 @@ Receiver<ValueType> FanoutChannel<ValueType, ContextType>::subscribe(
}
template <typename ValueType, typename ContextType>
bool FanoutChannel<ValueType, ContextType>::anySubscribers() {
bool FanoutChannel<ValueType, ContextType>::anySubscribers() const {
return processor_->anySubscribers();
}
......
......@@ -110,9 +110,9 @@ class FanoutChannel {
getInitialValues = {});
/**
* Returns whether this fanout channel has any output receivers.
* Returns whether this fanout channel has any subscribers.
*/
bool anySubscribers();
bool anySubscribers() const;
/**
* Closes the fanout channel.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment