1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002, 2014 Oracle and/or its affiliates.  All rights reserved.
5  *
6  */
7 
8 package com.sleepycat.je;
9 
10 /**
11  * A custom statistics object. Custom statistics allow for customization
12  * of statistics that are written at periodic intervals to the je.stats.csv
13  * file. The field names returned from the getFieldNames() method are used as
14  * column headers in the je.stat.csv file. The getFieldNames() method is only
15  * called once when the environment is opened. The field values are associated
16  * with the field names in the order of the returned array. The
17  * getFieldValues() method is called when a row is written to the statistics
18  * file. The semantic for the values are implementation specific. The values
19  * may represent totals, incremental (since the last getFieldValues() call), or
20  * stateless (computed at the time the statistic is requested).
21  */
22 public interface CustomStats {
23 
24     /**
25      * The field names that are output to the je.stats.csv file.
26      *
27      * @return Array of strings that represent the field values.
28      */
getFieldNames()29     String[] getFieldNames();
30 
31     /**
32      * The field values that are output to the je.stats.csv file.
33      *
34      * @return Array of strings that represent a value for the
35      * associated field name.
36      */
getFieldValues()37     String[] getFieldValues();
38 }
39