diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-09-11 13:02:32 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-09-11 13:02:32 +0200 |
commit | cedcb5c1047b94890c80a2d71afb808898233b9b (patch) | |
tree | 637b78cd06171738a3300043b0af43b43d17b0dc /cpp/src/IceStorm/Subscriber.h | |
parent | Merge remote-tracking branch 'origin/encoding11' into withoutsync (diff) | |
download | ice-cedcb5c1047b94890c80a2d71afb808898233b9b.tar.bz2 ice-cedcb5c1047b94890c80a2d71afb808898233b9b.tar.xz ice-cedcb5c1047b94890c80a2d71afb808898233b9b.zip |
Support for IceBox services MetricsAdmin and IceStorm metrics
Diffstat (limited to 'cpp/src/IceStorm/Subscriber.h')
-rw-r--r-- | cpp/src/IceStorm/Subscriber.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/IceStorm/Subscriber.h b/cpp/src/IceStorm/Subscriber.h index ba66ac9e91c..7f17631df8a 100644 --- a/cpp/src/IceStorm/Subscriber.h +++ b/cpp/src/IceStorm/Subscriber.h @@ -12,6 +12,8 @@ #include <IceStorm/IceStormInternal.h> #include <IceStorm/SubscriberRecord.h> +#include <IceStorm/Instrumentation.h> +#include <Ice/ObserverHelper.h> #include <IceUtil/RecMutex.h> namespace IceStorm @@ -49,6 +51,8 @@ public: void shutdown(); + void updateObserver(); + enum SubscriberState { SubscriberStateOnline, // Online waiting to send events. @@ -80,11 +84,14 @@ protected: SubscriberState _state; // The subscriber state. int _outstanding; // The current number of outstanding responses. + int _outstandingCount; // The current number of outstanding events when batching events (only used for metrics). EventDataSeq _events; // The queue of events to send. - // The next to try sending a new event if we're offline. + // The next time to try sending a new event if we're offline. IceUtil::Time _next; int _currentRetry; + + IceInternal::ObserverHelperT<IceStorm::Instrumentation::SubscriberObserver> _observer; }; bool operator==(const IceStorm::SubscriberPtr&, const Ice::Identity&); |