diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-02-02 13:01:42 -0500 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-02-02 13:01:42 -0500 |
commit | 5405365648a784d736ce8e1aa97ff7f4eb09c3aa (patch) | |
tree | f3495ba9bcaaa7a2b16216368b3cace0db0f2295 /src/mongo/db/initialize_snmp.h | |
parent | 970fdd08aa92e5393d3f616fd6270ea1fb688640 (diff) | |
download | mongo-5405365648a784d736ce8e1aa97ff7f4eb09c3aa.tar.gz |
SERVER-27764 Remove `initSNMP` function pointer.
The `initSNMP` function pointer isn't used by the enterprise modules
for registration purposes anymore. The new registration function
is used, instead. Documentation was also cleaned up for the
initialization library.
Diffstat (limited to 'src/mongo/db/initialize_snmp.h')
-rw-r--r-- | src/mongo/db/initialize_snmp.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mongo/db/initialize_snmp.h b/src/mongo/db/initialize_snmp.h index 9626cd2c56c..5d14f612162 100644 --- a/src/mongo/db/initialize_snmp.h +++ b/src/mongo/db/initialize_snmp.h @@ -32,12 +32,20 @@ #include "mongo/stdx/functional.h" namespace mongo { - +/** + * Registers the specified initializer function `init` as the initialization handler for SNMP + * enterprise modules. + * + * NOTE: This function may only be called once. + * NOTE: This function is not multithread safe. + */ void registerSNMPInitializer(stdx::function<void()> init); +/** + * Performs initialization for SNMP enterprise modules, if present, otherwise does nothing. + * + * This will call the function registered by `registerSNMPInitializer`. It is safe to call when no + * function has been registered. + */ void initializeSNMP(); - -// Deprecated -- will be removed. -extern void (*snmpInit)(); - } // namespace mongo |