Change in ovirt-engine[master]: scheduling: Use Optional instead of nulls for balancer results

rgolan at redhat.com rgolan at redhat.com
Mon Sep 5 14:51:17 UTC 2016


Roy Golan has submitted this change and it was merged.

Change subject: scheduling: Use Optional instead of nulls for balancer results
......................................................................


scheduling: Use Optional instead of nulls for balancer results

This patch converts most of the balancing return values
from nullable Pair<...> to Optional<BalancingResult>
with the goal of achieving better type safety.

Change-Id: Id0f54389a72aad870b61d4b9f58ccac1efdda488
Signed-off-by: Martin Sivak <msivak at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/PolicyUnitImpl.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/BalanceResult.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBroker.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerObjectBuilder.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerDiscovery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuAndMemoryBalancingPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NoneBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingBalancePolicyUnit.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/EvenDistributionBalancePolicyUnitTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingBalancePolicyUnitTest.java
13 files changed, 135 insertions(+), 101 deletions(-)

Approvals:
  Martin Sivák: Verified
  Jenkins CI: Passed CI tests
  Roy Golan: Looks good to me, approved
  Jenny Tokar: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/59401
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0f54389a72aad870b61d4b9f58ccac1efdda488
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Andrej Krejcir <akrejcir at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenny Tokar <jtokar at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Phillip Bailey <phbailey at redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Yanir Quinn <yquinn at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list