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(a)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(a)redhat.com>
Gerrit-Reviewer: Andrej Krejcir <akrejcir(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenny Tokar <jtokar(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Phillip Bailey <phbailey(a)redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Yanir Quinn <yquinn(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>