All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.container.jdisc.metric.DisableGuiceMetric Maven / Gradle / Ivy

The newest version!
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.jdisc.metric;

import com.yahoo.jdisc.Metric;

import java.util.Map;

/**
 * @author Tony Vaagenes
 */
public class DisableGuiceMetric implements Metric {

    @Override
    public void set(String s, Number number, Context context) {
        throw newException();
    }

    @Override
    public void add(String s, Number number, Context context) {
        throw newException();
    }

    @Override
    public Context createContext(Map stringMap) {
        throw newException();
    }

    private static RuntimeException newException() {
        return new UnsupportedOperationException("The Metric framework is only available to components.");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy