mooli tayer has posted comments on this change.
Change subject: core: Introduce new authentication interfaces
......................................................................
Patch Set 8: Code-Review+1
(2 comments)
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/authentication/Manager.java
Line 53: this.factoryInterface = factoryInterface;
Line 54:
Line 55: // Create the indexes for factories and objects:
Line 56: factoriesByType = new ConcurrentHashMap<String, Factory<O>>();
Line 57: factoriesByClass = new ConcurrentHashMap<Class<?>,
Factory<O>>();
Creating all maps as hash maps and on puts doing:
public synchronized void registerFactory(Factory<O> factory) {
Map<String, Factory<O>> nextFactoriesByType = new HashMap<String,
Factory<O>>(factoriesByType);
Map<Class<?>, Factory<O>> nextFactoriesByClass = new HashMap<Class<?>,
Factory<O>>(factoriesByClass);
nextFactoriesByType.put(factory.getType(), factory);
nextFactoriesByClass.put(factory.getClass(), factory);
factoriesByType=nextFactoriesByType;
factoriesByClass=nextFactoriesByClass;
}
Makes sense?
Line 58: objectsByName = new ConcurrentHashMap<String, O>();
Line 59:
Line 60: // Create the set of already loaded modules:
Line 61: loadedModules = new HashSet<String>();
Line 89: * @param file the file containing the configuration for the
instance, used only to generate useful log messages
Line 90: * @param config the configuration already loaded from the
properties file
Line 91: * @return a reference to the factory or {@code null} if the
factory can't be found for any reason
Line 92: */
Line 93: protected Factory<O> findFactory(File file, Configuration config) {
I see.
Line 94: // This will be the result:
Line 95: Factory<O> factory = null;
Line 96:
Line 97: // If a module has been specified then load all the factories
inside:
--
To view, visit http://gerrit.ovirt.org/15596
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If84a0c9d6553d81cdbbe224972696f169cca90d4
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches