All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.emc.vipr.model.sys.DownloadProgress Maven / Gradle / Ivy

There is a newer version: 3.5.0.0
Show newest version
/*
 * Copyright (c) 2014 EMC Corporation
 * All Rights Reserved
 */

package com.emc.vipr.model.sys;

import java.util.Map;
import java.util.TreeMap;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * DownloadProgress is a class used by REST API to represent the image downloading progress of each node in the cluster
 */
@XmlRootElement(name = "image_download_progress")
public class DownloadProgress {
    Map progress;
    long imageSize;

    public DownloadProgress() {
        progress = new TreeMap();
    }

    @XmlElement(name = "imageSize")
    public long getImageSize() {
        return imageSize;
    }

    public void setImageSize(long size) {
        this.imageSize = size;
    }

    @XmlElementWrapper(name = "progress")
    public Map getProgress() {
        return progress;
    }

    public void setProgress(Map progress) {
        this.progress = progress;
    }

    public void addNodeProgress(String nodeId, NodeProgress nodeProgress) {
        progress.put(nodeId, nodeProgress);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy