Split out odl-controller-blueprint
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / broker / impl / jmx / CommitStatsMXBean.java
1 /*
2  * Copyright (c) 2014 Brocade Communications Systems, Inc. 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.controller.md.sal.dom.broker.impl.jmx;
10
11 /**
12  * MXBean interface for retrieving write Tx commit statistics.
13  *
14  * @author Thomas Pantelis
15  */
16 public interface CommitStatsMXBean {
17
18     /**
19      * Returns the total number of commits that have occurred.
20      *
21      * @return Returns the total number of commits that have occurred
22      *
23      */
24     long getTotalCommits();
25
26     /**
27      * Returns a string representing the time duration of the longest commit, in the appropriate
28      * scaled units, along with the date/time that it occurred.
29      *
30      * @return string
31      */
32     String getLongestCommitTime();
33
34     /**
35      * Returns a string representing the time duration of the shortest commit, in the appropriate
36      * scaled units, along with the date/time that it occurred.
37      *
38      * @return string
39      */
40     String getShortestCommitTime();
41
42     /**
43      * Returns a string representing average commit time duration, in the appropriate
44      * scaled units.
45      *
46      * @return string
47      */
48     String getAverageCommitTime();
49
50     /**
51      * Clears the current stats to their defaults.
52      */
53     void clearStats();
54 }