Change in ovirt-engine[master]: core: Remove Entities#getIds

amureini at redhat.com amureini at redhat.com
Tue Apr 26 10:55:59 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Remove Entities#getIds
......................................................................


core: Remove Entities#getIds

In Java 8, with a sensible steaming API, there's no reason to have a
method like Entities#getIds.

Removing this method not only improves the code by removing spam, in
some cases, improves performance, where a Set is used instead of a List,
improving the complexity of the contains operation to O(1) instead of
O(n).

Change-Id: Ia6008fd6701322a62f1e734b8fda925fda6e2dd6
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreStatelessVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/numa/vm/SetVmNumaNodesCommand.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/storage/connection/CINDERStorageHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/AddExistingBlockStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/GetUnregisteredBlockStorageDomainsQuery.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Entities.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTemplatesResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsProxyData.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HostNetworkInterfacesPersisterImpl.java
11 files changed, 27 insertions(+), 32 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6008fd6701322a62f1e734b8fda925fda6e2dd6
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list