public Definition()

in geronimo-metrics-extensions/geronimo-metrics-extension-common/src/main/java/org/apache/geronimo/microprofile/metrics/extension/common/Definition.java [31:46]


    public Definition(final String name, final String displayName, final String description,
                       final String unit, final ThrowingSupplier<Number> evaluator) {
        this.name = name;
        this.displayName = displayName;
        this.description = description;
        this.unit = unit;
        this.evaluator = () -> {
            try {
                return evaluator.get().doubleValue();
            } catch (final Throwable throwable) {
                return -1;
            }
        };

        this.hash = Objects.hash(name);
    }