Search in sources :

Example 6 with ServiceType

use of org.ovirt.engine.core.common.businessentities.gluster.ServiceType in project ovirt-engine by oVirt.

the class GlusterServiceSyncJob method getClusterServiceMap.

private Map<ServiceType, GlusterClusterService> getClusterServiceMap(Cluster cluster) {
    List<GlusterClusterService> clusterServices = clusterServiceDao.getByClusterId(cluster.getId());
    if (clusterServices == null) {
        clusterServices = new ArrayList<>();
    }
    Map<ServiceType, GlusterClusterService> clusterServiceMap = new HashMap<>();
    for (GlusterClusterService clusterService : clusterServices) {
        clusterServiceMap.put(clusterService.getServiceType(), clusterService);
    }
    return clusterServiceMap;
}
Also used : GlusterClusterService(org.ovirt.engine.core.common.businessentities.gluster.GlusterClusterService) HashMap(java.util.HashMap) ServiceType(org.ovirt.engine.core.common.businessentities.gluster.ServiceType)

Aggregations

ServiceType (org.ovirt.engine.core.common.businessentities.gluster.ServiceType)6 GlusterServiceStatus (org.ovirt.engine.core.common.businessentities.gluster.GlusterServiceStatus)4 HashMap (java.util.HashMap)3 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)2 VDS (org.ovirt.engine.core.common.businessentities.VDS)2 GlusterClusterService (org.ovirt.engine.core.common.businessentities.gluster.GlusterClusterService)2 GlusterServerService (org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService)2 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)2 Context (com.google.gwt.cell.client.Cell.Context)1 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)1 Column (com.google.gwt.user.cellview.client.Column)1 ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 Comparator (java.util.Comparator)1 List (java.util.List)1 Callable (java.util.concurrent.Callable)1 OnTimerMethodAnnotation (org.ovirt.engine.core.utils.timer.OnTimerMethodAnnotation)1 EntityModelCheckBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)1 EntityModelRadioButtonEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)1 EnumRenderer (org.ovirt.engine.ui.common.widget.renderer.EnumRenderer)1