armi.pluginManager module¶
Slightly customized version of the stock pluggy PluginManager
.
-
class
armi.pluginManager.
ArmiPluginManager
(*args, **kwargs)[source]¶ Bases:
pluggy._manager.PluginManager
PluginManager implementation with ARMI-specific features.
The main point of this subclass is to make it possible to detect when the plugin manager has been mutated, allowing for safe caching of expensive results derived from the set of registered plugins. This is done by exposing a counter that is incremented any time the set of registered plugins is modified. If a client caches any results derived from calling plugin hooks, caching this counter along with that data allows for cheaply testing that the cached results are still valid.
-
property
counter
¶
-
register
(*args, **kwargs)[source]¶ Register a plugin and return its canonical name or
None
if the name is blocked from registering. Raise aValueError
if the plugin is already registered.
-
property