aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com/yahoo/container/jdisc/state/MetricConsumerProviders.java
blob: 335e5407e6f95a71b71215324c3b980bf666b350 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.jdisc.state;

import com.google.inject.Provider;
import com.yahoo.jdisc.application.MetricConsumer;

/**
 * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a>
 */
class MetricConsumerProviders {

    public static Provider<MetricConsumer> wrap(final StateMonitor statetMonitor) {
        return new Provider<MetricConsumer>() {

            @Override
            public MetricConsumer get() {
                return statetMonitor.newMetricConsumer();
            }
        };
    }
}