summaryrefslogtreecommitdiffstats
path: root/statistics/src/main/java/com/yahoo/statistics/Proxy.java
blob: 46fa4a3190cd03f8f9a781ba3003a6e3092f3186 (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
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.statistics;


/**
 * Base class for event proxies, which are used to cache and group
 * events internally.
 *
 * @author  <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
 */
abstract class Proxy {
    private long timestamp;
    private String name;

    Proxy(String name) {
        this(name, System.currentTimeMillis());
    }

    Proxy(String name, long timestamp) {
        this.timestamp = timestamp;
        this.name = name;
    }

    long getTimestamp() {
        return timestamp;
    }

    String getName() {
        return name;
    }
}