001/* 002 * (C) Copyright 2006-2009 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id$ 020 */ 021package org.nuxeo.runtime.management.counters; 022 023/** 024 * Service interface to manage Counters. This services hides the Counters implementation so that Counters's updated 025 * don't have to be dependent on Simon 026 * 027 * @author Tiry (tdelprat@nuxeo.com) 028 * @deprecated since 11.4: use dropwizard metrics counter instead 029 */ 030@Deprecated(since = "11.4") 031public interface CounterManager { 032 033 /** 034 * Increase a counter 035 */ 036 void increaseCounter(String counterName); 037 038 void increaseCounter(String counterName, long value); 039 040 /** 041 * Set the value of a counter 042 */ 043 void setCounterValue(String counterName, long value); 044 045 /** 046 * Decrease a counter 047 */ 048 void decreaseCounter(String counterName); 049 050 void decreaseCounter(String counterName, long value); 051 052 /** 053 * Get recorder values of the counter over time 054 */ 055 CounterHistoryStack getCounterHistory(String counterName); 056 057 /** 058 * Enables all counters 059 */ 060 void enableCounters(); 061 062 /** 063 * Desable all couters 064 */ 065 void disableCounters(); 066 067}