Daniel Erez has posted comments on this change.

Change subject: core,webadmin: GetConfigurationValuesQuery for UI cache
......................................................................


Patch Set 1: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetConfigurationValuesQuery.java
Line 26:         super(parameters);
Line 27:     }
Line 28: 
Line 29:     @Override
Line 30:     protected void executeQueryCommand() {
Simpler integration with the UI - it uses Map.Entry
Line 31:         Map<Map.Entry<ConfigurationValues, String>, Object> 
configValuesMap =
Line 32:                 new HashMap<Map.Entry<ConfigurationValues, String>, 
Object>();
Line 33: 
Line 34:         for (ConfigurationValues configValue : 
ConfigurationValues.values()) {


Line 32:                 new HashMap<Map.Entry<ConfigurationValues, String>, 
Object>();
Line 33: 
Line 34:         for (ConfigurationValues configValue : 
ConfigurationValues.values()) {
Line 35:             // Ignore an admin configuration value on filtered mode
Line 36:             // Ignore a configuration value that doesn't exist in 
ConfigValues enum
The total complexity is O(n) - all configuration values from vdc_options
Line 37:             if (!shouldReturnValue(configValue) || 
!EnumCompat.IsDefined(ConfigValues.class, configValue.toString())) {
Line 38:                 continue;
Line 39:             }
Line 40: 


Line 41:             // Adding a configuration value for each version
Line 42:             for (String version : versions) {
Line 43:                 Map.Entry<ConfigurationValues, String> key =
Line 44:                         new KeyValuePairCompat<ConfigurationValues, 
String>(configValue, version);
Line 45:                 Object value =
valueOf throws IllegalArgumentException if the specified enum type has no 
constant with the specified name.
Line 46:                         Config.<Object> 
GetValue(ConfigValues.valueOf(configValue.toString()), version);
Line 47: 
Line 48:                 configValuesMap.put(key, value);
Line 49:             }


--
To view, visit http://gerrit.ovirt.org/8563
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id51a9f86bceef07de728335643b16c0554b6876c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to