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