First use of the infrautils counters in netvirt.
[netvirt.git] / vpnservice / dhcpservice / dhcpservice-impl / src / main / java / org / opendaylight / netvirt / dhcpservice / DhcpServiceCounters.java
1 /*
2  * Copyright (c) 2016 Hewlett-Packard Enterprise and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netvirt.dhcpservice;
10
11 import org.opendaylight.infrautils.counters.api.OccurenceCounter;
12
13 public enum DhcpServiceCounters {
14     install_dhcp_drop_flow, //
15     install_dhcp_flow, //
16     install_dhcp_table_miss_flow, //
17     install_dhcp_table_miss_flow_for_external_table, //
18     remove_dhcp_drop_flow, //
19     remove_dhcp_flow;
20
21     private OccurenceCounter counter;
22
23     private DhcpServiceCounters() {
24         counter = new OccurenceCounter(getClass().getEnclosingClass().getSimpleName(), name(), name());
25     }
26
27     public void inc() {
28         counter.inc();
29     }
30 }