aboutsummaryrefslogtreecommitdiffstats
path: root/vespalog/src/main/java/com/yahoo/log/event/Progress.java
blob: 3ad582d7562f5d70a66d3433c706a9030576c590 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.log.event;

/**
 *
 * @author  Bjorn Borud
 */
class Progress extends Event {
    public Progress () {
    }

    public Progress (String name, String value, String total) {
        init(name, value, total);
    }

    public Progress (String name, double value, double total) {
        init(name, Double.toString(value), Double.toString(total));
    }

    public Progress (String name, String value) {
        init(name, value, "");
    }

    public Progress (String name, double value) {
        init(name, Double.toString(value), "");
    }

    private void init (String name, String value, String total) {
        setValue("name", name);
        setValue("value", value);
        setValue("total", total);
    }
}