blob: e7c043d352d761a8a71f3018c1213fd658cd7857 (
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
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.docproc.jdisc.metric;
import com.yahoo.jdisc.Metric;
import java.util.Map;
/**
* @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
*/
public class NullMetric implements Metric {
@Override
public void set(String key, Number val, Context ctx) {
}
@Override
public void add(String key, Number val, Context ctx) {
}
@Override
public Context createContext(Map<String, ?> properties) {
return NullContext.INSTANCE;
}
private static class NullContext implements Context {
private static final NullContext INSTANCE = new NullContext();
}
}
|