- private final YangStoreSnapshot yangStoreSnapshot;
- private static final Logger logger = LoggerFactory.getLogger(Get.class);
-
- public Get(YangStoreSnapshot yangStoreSnapshot, ConfigRegistryClient configRegistryClient,
- String netconfSessionIdForReporting) {
- super(configRegistryClient, netconfSessionIdForReporting);
- this.yangStoreSnapshot = yangStoreSnapshot;
- }
-
- private Map<String, Map<String, ModuleRuntime>> createModuleRuntimes(ConfigRegistryClient configRegistryClient,
- Map<String, Map<String, ModuleMXBeanEntry>> mBeanEntries) {
- Map<String, Map<String, ModuleRuntime>> retVal = Maps.newHashMap();
-
- for (String namespace : mBeanEntries.keySet()) {
-
- Map<String, ModuleRuntime> innerMap = Maps.newHashMap();
- Map<String, ModuleMXBeanEntry> entriesFromNamespace = mBeanEntries.get(namespace);
- for (String module : entriesFromNamespace.keySet()) {
-
- ModuleMXBeanEntry mbe = entriesFromNamespace.get(module);
-
- Map<RuntimeBeanEntry, InstanceConfig> cache = Maps.newHashMap();
- RuntimeBeanEntry root = null;
- for (RuntimeBeanEntry rbe : mbe.getRuntimeBeans()) {
- cache.put(rbe, new InstanceConfig(configRegistryClient, rbe.getYangPropertiesToTypesMap(), mbe.getNullableDummyContainerName()));
- if (rbe.isRoot()){
- root = rbe;
- }
- }
-
- if (root == null){
- continue;
- }
-
- InstanceRuntime rootInstanceRuntime = createInstanceRuntime(root, cache);
- ModuleRuntime moduleRuntime = new ModuleRuntime(rootInstanceRuntime);
- innerMap.put(module, moduleRuntime);
- }