1/*-
2 * Automatically built by dist/s_java_stat.
3 * Only the javadoc comments can be edited.
4 *
5 * See the file LICENSE for redistribution information.
6 *
7 * Copyright (c) 2002,2008 Oracle.  All rights reserved.
8 */
9
10package com.sleepycat.db;
11
12import com.sleepycat.db.internal.DbUtil;
13
14/**
15Statistics returned by a {@link Database#compact} operation.
16*/
17public class CompactStats {
18    // no public constructor
19    /* package */ CompactStats() {}
20
21    /* package */
22    CompactStats(int fillpercent, int timeout, int pages) {
23        this.compact_fillpercent = fillpercent;
24        this.compact_timeout = timeout;
25        this.compact_pages = pages;
26    }
27
28    private int compact_fillpercent;
29    /* package */ int getFillPercent() {
30        return compact_fillpercent;
31    }
32
33    private int compact_timeout;
34    /* package */ int getTimeout() {
35        return compact_timeout;
36    }
37
38    private int compact_pages;
39    /* package */ int getPages() {
40        return compact_pages;
41    }
42
43    private int compact_pages_free;
44    /**
45Return the the number of database pages free during
46    the compaction phase.
47<p>
48This method may be called at any time during the life of the application.
49<p>
50@return
51The the number of database pages free during
52    the compaction phase.
53    **/
54    public int getPagesFree() {
55        return compact_pages_free;
56    }
57
58    private int compact_pages_examine;
59    /**
60Return the the number of database pages reviewed
61    during the compaction phase.
62<p>
63This method may be called at any time during the life of the application.
64<p>
65@return
66The the number of database pages reviewed
67    during the compaction phase.
68    **/
69    public int getPagesExamine() {
70        return compact_pages_examine;
71    }
72
73    private int compact_levels;
74    /**
75Return the the number of levels removed from the
76    Btree or Recno database during the compaction phase.
77<p>
78This method may be called at any time during the life of the application.
79<p>
80@return
81The the number of levels removed from the
82    Btree or Recno database during the compaction phase.
83    **/
84    public int getLevels() {
85        return compact_levels;
86    }
87
88    private int compact_deadlock;
89    /**
90Return the if no transaction parameter was specified to
91    {@link Database#compact}, the number of deadlocks
92    which occurred..
93<p>
94This method may be called at any time during the life of the application.
95<p>
96@return
97The if no transaction parameter was specified to
98    {@link Database#compact}, the number of deadlocks
99    which occurred..
100    **/
101    public int getDeadlock() {
102        return compact_deadlock;
103    }
104
105    private int compact_pages_truncated;
106    /**
107Return the the number of database pages returned
108    to the filesystem.
109<p>
110This method may be called at any time during the life of the application.
111<p>
112@return
113The the number of database pages returned
114    to the filesystem.
115    **/
116    public int getPagesTruncated() {
117        return compact_pages_truncated;
118    }
119
120    private int compact_truncate;
121    /* package */ int getTruncate() {
122        return compact_truncate;
123    }
124
125    /**
126    For convenience, the CompactStats class has a toString method that lists
127    all the data fields.
128    */
129    public String toString() {
130        return "CompactStats:"
131            + "\n  compact_fillpercent=" + compact_fillpercent
132            + "\n  compact_timeout=" + compact_timeout
133            + "\n  compact_pages=" + compact_pages
134            + "\n  compact_pages_free=" + compact_pages_free
135            + "\n  compact_pages_examine=" + compact_pages_examine
136            + "\n  compact_levels=" + compact_levels
137            + "\n  compact_deadlock=" + compact_deadlock
138            + "\n  compact_pages_truncated=" + compact_pages_truncated
139            + "\n  compact_truncate=" + compact_truncate
140            ;
141    }
142}
143