mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
05.03.2019 add986cff9c8e1a00428122a0d5515e6bd00120f
borgbutler-core/src/main/java/de/micromata/borgbutler/json/borg/ProgressInfo.java
File was renamed from borgbutler-core/src/main/java/de/micromata/borgbutler/json/borg/ProgressMessage.java
@@ -7,7 +7,7 @@
 * Output of borg option <tt>--progress</tt>.
 * See https://borgbackup.readthedocs.io/en/stable/internals/frontends.html,
 */
public class ProgressMessage implements Cloneable {
public class ProgressInfo implements Cloneable {
    // {"message": "Calculating statistics...   0%", "current": 1, "total": 2497, "info": null, "operation": 1, "msgid": null, "type": "progress_percent", "finished": false, "time": 1546640510.116256}
    /**
     * e. g. Calculating statistics...   5%
@@ -22,6 +22,7 @@
    @Setter
    private long current;
    @Getter
    @Setter
    private long total;
    /**
     * Array that describes the current item, may be null, contents depend on msgid.
@@ -48,16 +49,16 @@
    @Getter
    private double time;
    public ProgressMessage incrementCurrent() {
    public ProgressInfo incrementCurrent() {
        ++current;
        return this;
    }
    @Override
    public ProgressMessage clone() {
        ProgressMessage clone = null;
    public ProgressInfo clone() {
        ProgressInfo clone = null;
        try {
            clone = (ProgressMessage) super.clone();
            clone = (ProgressInfo) super.clone();
        } catch (CloneNotSupportedException ex) {
            throw new UnsupportedOperationException(this.getClass().getCanonicalName() + " isn't cloneable: " + ex.getMessage(), ex);
        }