Tal Nisan has posted comments on this change.

Change subject: restapi : [RFE] Add the option to retrieve the top X disks in a 
storage domain(#950129)
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/20297/5/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResource.java:

Line 48:         }
Line 49:     }
Line 50: 
Line 51:     @Override
Line 52:     protected 
Comparator<org.ovirt.engine.core.common.businessentities.Disk> 
getSortComparator() {
Are we definitely sure that we'd like to have a single comparator and it should 
be a size comparator? What happens if we decide that we'd like to allow sorting 
by disk alias for instance? Isn't it better if we build a bit more 
sophisticated infrastructure that will allow us to choose the comparator type 
by a matrix parameter?
Line 53:         return new 
Comparator<org.ovirt.engine.core.common.businessentities.Disk>() {
Line 54:             @Override
Line 55:             public int 
compare(org.ovirt.engine.core.common.businessentities.Disk disk1, 
org.ovirt.engine.core.common.businessentities.Disk disk2) {
Line 56:                 return ((Long) 
disk2.getSize()).compareTo(disk1.getSize());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbefd30b1b1e62d87c30a836236028777e734a7d
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8...@yahoo.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to