Moti Asayag has posted comments on this change. Change subject: events: use separate queue for events ......................................................................
Patch Set 9: (5 comments) https://gerrit.ovirt.org/#/c/41796/9/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/TransportFactory.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/TransportFactory.java: Line 18: import org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper; Line 19: import org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils; Line 20: Line 21: public class TransportFactory { Line 22: public static IIrsServer createIrsServer(VdsProtocol vdsProtocol, Version version, String hostname, int port, int clientTimeOut, please format the signature - it became too long Line 23: int connectionTimeOut, int clientRetries, int heartbeat) { Line 24: IIrsServer irsServer = null; Line 25: if (VdsProtocol.STOMP == vdsProtocol) { Line 26: String eventQueue = null; Line 22: public static IIrsServer createIrsServer(VdsProtocol vdsProtocol, Version version, String hostname, int port, int clientTimeOut, Line 23: int connectionTimeOut, int clientRetries, int heartbeat) { Line 24: IIrsServer irsServer = null; Line 25: if (VdsProtocol.STOMP == vdsProtocol) { Line 26: String eventQueue = null; you can extract this into a static method named: String getEventsQueue(Version version){...} and reuse it in both methods. Line 27: if (FeatureSupported.events(version)) { Line 28: eventQueue = Config.<String> getValue(ConfigValues.EventQueueName); Line 29: } Line 30: irsServer = new JsonRpcIIrsServer(JsonRpcUtils.createStompClient(hostname, Line 46: } Line 47: return irsServer; Line 48: } Line 49: Line 50: public static IVdsServer createVdsServer(VdsProtocol vdsProtocol, Version version, String hostname, int port, int clientTimeOut, same please. Line 51: int connectionTimeOut, int clientRetries, int heartbeat) { Line 52: IVdsServer vdsServer = null; Line 53: Pair<VdsServerConnector, HttpClient> returnValue = Line 54: XmlRpcUtils.getConnection(hostname, port, clientTimeOut, connectionTimeOut, https://gerrit.ovirt.org/#/c/41796/9/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java: Line 182: int clientTimeOut = Config.<Integer> getValue(ConfigValues.vdsTimeout) * 1000; Line 183: int connectionTimeOut = Config.<Integer> getValue(ConfigValues.vdsConnectionTimeout) * 1000; Line 184: int heartbeat = Config.<Integer> getValue(ConfigValues.vdsHeartbeatInSeconds) * 1000; Line 185: int clientRetries = Config.<Integer> getValue(ConfigValues.vdsRetries); Line 186: vdsProxy = TransportFactory.createVdsServer( i wonder why not to pass the VDS as parameter for this method instead of the detailed argument list. Line 187: cachedVds.getProtocol(), Line 188: cachedVds.getVdsGroupCompatibilityVersion(), Line 189: cachedVds.getHostName(), Line 190: cachedVds.getPort(), https://gerrit.ovirt.org/#/c/41796/9/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsProxyData.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsProxyData.java: Line 138: private void setProtocol(VdsProtocol value) { Line 139: this.privateProtocol = value; Line 140: } Line 141: Line 142: private Version privateVersion; the 'private' as prefix for the names is an awkward convention :) Line 143: Line 144: private Version getVersion() { Line 145: return this.privateVersion; Line 146: } -- To view, visit https://gerrit.ovirt.org/41796 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ff65e274d03a8059130fbd9baca1320a6524aa3 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches