Oved Ourfali has posted comments on this change.

Change subject: core: Add FenceKdumpMessage entity
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.ovirt.org/#/c/27200/1//COMMIT_MSG
Commit Message:

Line 7: core: Add FenceKdumpMessage entity
Line 8: 
Line 9: 1) Creates fence_kdump_messages table
Line 10: 2) Add stored procedure to access fence_kdump_messages table
Line 11: 3) Ads DAO to access the entity
s/ads/add
Line 12: 
Line 13: Change-Id: I58696ddefa8602b1daa5f55ab4dc11bdc565e265
Line 14: Bug-Url: https://bugzilla.redhat.com/1079821


http://gerrit.ovirt.org/#/c/27200/1/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/KdumpFlowStatus.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/KdumpFlowStatus.java:

Line 21: 
Line 22:     /**
Line 23:      * Returns string value (lowercase name)
Line 24:      */
Line 25:     public String getAsString() {
I'd prefer toString
Line 26:         return name().toLowerCase();
Line 27:     }
Line 28: 
Line 29:     /**


Line 31:      *
Line 32:      * @param value
Line 33:      *            string value
Line 34:      */
Line 35:     public static KdumpFlowStatus forString(String value) {
I'd prefer fromString
Line 36:         KdumpFlowStatus result = null;
Line 37:         if (value != null) {
Line 38:             result = KdumpFlowStatus.valueOf(value.toUpperCase());
Line 39:         }


http://gerrit.ovirt.org/#/c/27200/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/FenceKdumpMessageDaoDbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/FenceKdumpMessageDaoDbFacadeImpl.java:

Line 48:         boolean alive = false;
Line 49:         FenceKdumpMessage msg = getMostRecent(HEARTBEAT_RECORD);
Line 50:         if (msg != null) {
Line 51:             int timeout = Config.<Integer> 
getValue(ConfigValues.FenceKdumpListenerAliveTimeout) * 1000;
Line 52:             alive = msg.getReceived().getTime() + timeout > 
System.currentTimeMillis();
Not sure I'd put this logic in here.
Perhaps we need another class in between?
Let's see what others think.
Line 53:         }
Line 54:         return alive;
Line 55:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I58696ddefa8602b1daa5f55ab4dc11bdc565e265
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: [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

Reply via email to