summaryrefslogtreecommitdiff
path: root/src/mongo/db/free_mon/free_mon_processor.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2018-05-01 13:37:31 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2018-05-01 13:37:31 -0400
commit2187223b39c7824d9edc33cccbe84c577081cd81 (patch)
treefbb8f06dbc9256bdca1507c1db00e4473f769b32 /src/mongo/db/free_mon/free_mon_processor.h
parent404b3532261866aec6a05a8e4fb7e35c212986d5 (diff)
downloadmongo-2187223b39c7824d9edc33cccbe84c577081cd81.tar.gz
SERVER-34228 Free Monitoring Replica Set support
Diffstat (limited to 'src/mongo/db/free_mon/free_mon_processor.h')
-rw-r--r--src/mongo/db/free_mon/free_mon_processor.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mongo/db/free_mon/free_mon_processor.h b/src/mongo/db/free_mon/free_mon_processor.h
index ade74fc09e6..64734d3a981 100644
--- a/src/mongo/db/free_mon/free_mon_processor.h
+++ b/src/mongo/db/free_mon/free_mon_processor.h
@@ -375,6 +375,34 @@ private:
void doAsyncMetricsFail(
Client* client, const FreeMonMessageWithPayload<FreeMonMessageType::AsyncMetricsFail>* msg);
+ /**
+ * Process a change to become a replica set primary
+ */
+ void doOnTransitionToPrimary(Client* client);
+
+ /**
+ * Process a notification that storage has received insert or update.
+ */
+ void doNotifyOnUpsert(Client* client,
+ const FreeMonMessageWithPayload<FreeMonMessageType::NotifyOnUpsert>* msg);
+
+ /**
+ * Process a notification that storage has received delete or drop collection.
+ */
+ void doNotifyOnDelete(Client* client);
+
+
+ /**
+ * Process a notification that storage has rolled back.
+ */
+ void doNotifyOnRollback(Client* client);
+
+ /**
+ * Process a in-memory state transition of state.
+ */
+ void processInMemoryStateChange(const FreeMonStorageState& originalState,
+ const FreeMonStorageState& newState);
+
private:
// Collection of collectors to send on registration
FreeMonCollectorCollection& _registration;
@@ -412,6 +440,9 @@ private:
// Last read storage state
boost::optional<FreeMonStorageState> _lastReadState;
+ // When we change to primary, do we register?
+ bool _registerOnTransitionToPrimary{false};
+
// Pending update to disk
FreeMonStorageState _state;