This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit b448717080c1dcefb8788f522c22b58f5568b0c0 Author: Tran Tien Duc <[email protected]> AuthorDate: Mon Dec 16 10:37:48 2019 +0700 [Refactoring] Drop NoopMetricFactory --- .../james/metrics/api/NoopMetricFactory.java | 66 ---------------------- 1 file changed, 66 deletions(-) diff --git a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java deleted file mode 100644 index 446af5a..0000000 --- a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ -package org.apache.james.metrics.api; - -public class NoopMetricFactory implements MetricFactory { - - @Override - public Metric generate(String name) { - return new NoopMetric(); - } - - public static class NoopMetric implements Metric { - - @Override - public void increment() { - } - - @Override - public void decrement() { - } - - @Override - public void add(int value) { - } - - @Override - public void remove(int value) { - } - } - - @Override - public TimeMetric timer(String name) { - return new NoopTimeMetric(); - } - - public static class NoopTimeMetric implements TimeMetric { - - @Override - public String name() { - return ""; - } - - - @Override - public long stopAndPublish() { - return 0; - } - } - -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
