#include "subscription_fwd.hpp"


Public Types | |
| using | ReceiverType = Receiver |
| using | Hash = size_t |
| using | Parent = Subscriber< EventKey, Dispatcher, Arguments... > |
| using | SubscriptionEngineType = SubscriptionEngine< typename Parent::EventType, Dispatcher, Subscriber< typename Parent::EventType, Dispatcher, Arguments... > > |
| using | SubscriptionEnginePtr = std::shared_ptr< SubscriptionEngineType > |
| using | SubscriptionEngineWPtr = std::weak_ptr< SubscriptionEngineType > |
| using | CallbackFnType = std::function< void(SubscriptionSetId, ReceiverType &, const typename Parent::EventType &, Arguments &&...)> |
Public Types inherited from iroha::subscription::Subscriber< EventKey, Dispatcher, Arguments... > | |
| using | EventType = EventKey |
Public Member Functions | |
| ~SubscriberImpl () | |
| void | setCallback (CallbackFnType &&f) |
| SubscriptionSetId | generateSubscriptionSetId () |
| void | subscribe (SubscriptionSetId id, const typename Parent::EventType &key, typename Dispatcher::Tid tid=Dispatcher::kExecuteInPool) |
| bool | unsubscribe (SubscriptionSetId id, const typename Parent::EventType &key) |
| bool | unsubscribe (SubscriptionSetId id) |
| void | unsubscribe () |
| void | on_notify (SubscriptionSetId set_id, const typename Parent::EventType &key, Arguments &&... args) override |
| ReceiverType & | get () |
Public Member Functions inherited from iroha::subscription::Subscriber< EventKey, Dispatcher, Arguments... > | |
| virtual | ~Subscriber ()=default |
| virtual void | on_notify (SubscriptionSetId set_id, const EventType &key, Arguments &&... args)=0 |
Static Public Member Functions | |
| template<typename... SubscriberConstructorArgs> | |
| static std::shared_ptr< SubscriberImpl > | create (SubscriptionEnginePtr const &ptr, SubscriberConstructorArgs &&... args) |
Is a wrapper class, which provides subscription to events from SubscriptionEngine
| EventKey | is a type of a particular subscription event (might be a key from an observed storage or a specific event type from an enumeration). |
| Dispatcher | thread dispatcher |
| Receiver | is a type of an object which is a part of Subscriber's internal state and can be accessed on every event notification. |
| Arguments | is a set of types of objects that are passed on every event notification. |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::CallbackFnType = std::function<void(SubscriptionSetId, ReceiverType &, const typename Parent::EventType &, Arguments &&...)> |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::Hash = size_t |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::Parent = Subscriber<EventKey, Dispatcher, Arguments...> |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::ReceiverType = Receiver |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::SubscriptionEnginePtr = std::shared_ptr<SubscriptionEngineType> |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::SubscriptionEngineType = SubscriptionEngine< typename Parent::EventType, Dispatcher, Subscriber<typename Parent::EventType, Dispatcher, Arguments...> > |
| using iroha::subscription::SubscriberImpl< EventKey, Dispatcher, Receiver, Arguments >::SubscriptionEngineWPtr = std::weak_ptr<SubscriptionEngineType> |
|
inline |
|
inlinestatic |

|
inline |
|
inline |
|
inlineoverride |
|
inline |
|
inline |
Here we check first local subscriptions because of strong connection with SubscriptionEngine.
|
inline |
| id | – subscription set id that unsubscribes from
|
| key | – event key to unsubscribe from |
|
inline |
| id | – subscription set id to unsubscribe from |
|
inline |