blob: f33b82d3869071a1382712a8893cb9f5a868a94e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
/*-
* Automatically built by dist/s_java_stat.
* Only the javadoc comments can be edited.
*
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*/
package com.sleepycat.db;
/**
The HashStats object is used to return Hash database statistics.
*/
public class HashStats extends DatabaseStats {
// no public constructor
/* package */ HashStats() {}
private int hash_magic;
/**
The magic number that identifies the file as a Hash file.
*/
public int getMagic() {
return hash_magic;
}
private int hash_version;
/**
The version of the Hash database.
*/
public int getVersion() {
return hash_version;
}
private int hash_metaflags;
/**
Reports internal flags. For internal use only.
*/
public int getMetaFlags() {
return hash_metaflags;
}
private int hash_nkeys;
/**
The number of unique keys in the database.
<p>
If the {@link com.sleepycat.db.Database#getStats Database.getStats} call was configured by the
{@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method, the count will be the last
saved value unless it has never been calculated, in which case it
will be 0.
*/
public int getNumKeys() {
return hash_nkeys;
}
private int hash_ndata;
/**
The number of key/data pairs in the database.
<p>
If the {@link com.sleepycat.db.Database#getStats Database.getStats} call was configured by the
{@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method, the count will be the last
saved value unless it has never been calculated, in which case it
will be 0.
*/
public int getNumData() {
return hash_ndata;
}
private int hash_nblobs;
/**
The number of blob records.
*/
public int getNumBlobs() {
return hash_nblobs;
}
private int hash_pagecnt;
/**
The number of pages in the database.
<p>
Returned if {@link StatsConfig#setFast} was configured.
*/
public int getPageCount() {
return hash_pagecnt;
}
private int hash_pagesize;
/**
The underlying Hash database page (and bucket) size, in bytes.
*/
public int getPageSize() {
return hash_pagesize;
}
private int hash_ffactor;
/**
The desired fill factor specified at database-creation time.
*/
public int getFfactor() {
return hash_ffactor;
}
private int hash_buckets;
/**
The number of hash buckets.
*/
public int getBuckets() {
return hash_buckets;
}
private int hash_free;
/**
The number of pages on the free list.
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public int getFree() {
return hash_free;
}
private long hash_bfree;
/**
The number of bytes free on bucket pages.
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public long getBFree() {
return hash_bfree;
}
private int hash_bigpages;
/**
The number of hash overflow pages (created when key/data is too big for
the page).
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public int getBigPages() {
return hash_bigpages;
}
private long hash_big_bfree;
/**
The number of bytes free on hash overflow (big item) pages.
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public long getBigBFree() {
return hash_big_bfree;
}
private int hash_overflows;
/**
The number of bucket overflow pages (bucket overflow pages are created when
items did not fit on the main bucket page).
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public int getOverflows() {
return hash_overflows;
}
private long hash_ovfl_free;
/**
The number of bytes free on bucket overflow pages.
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public long getOvflFree() {
return hash_ovfl_free;
}
private int hash_dup;
/**
The number of duplicate pages.
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public int getDup() {
return hash_dup;
}
private long hash_dup_free;
/**
The number of bytes free on duplicate pages.
<p>
The information is only included if the {@link com.sleepycat.db.Database#getStats Database.getStats} call
was not configured by the {@link com.sleepycat.db.StatsConfig#setFast StatsConfig.setFast} method.
*/
public long getDupFree() {
return hash_dup_free;
}
/**
For convenience, the HashStats class has a toString method
that lists all the data fields.
*/
public String toString() {
return "HashStats:"
+ "\n hash_magic=" + hash_magic
+ "\n hash_version=" + hash_version
+ "\n hash_metaflags=" + hash_metaflags
+ "\n hash_nkeys=" + hash_nkeys
+ "\n hash_ndata=" + hash_ndata
+ "\n hash_nblobs=" + hash_nblobs
+ "\n hash_pagecnt=" + hash_pagecnt
+ "\n hash_pagesize=" + hash_pagesize
+ "\n hash_ffactor=" + hash_ffactor
+ "\n hash_buckets=" + hash_buckets
+ "\n hash_free=" + hash_free
+ "\n hash_bfree=" + hash_bfree
+ "\n hash_bigpages=" + hash_bigpages
+ "\n hash_big_bfree=" + hash_big_bfree
+ "\n hash_overflows=" + hash_overflows
+ "\n hash_ovfl_free=" + hash_ovfl_free
+ "\n hash_dup=" + hash_dup
+ "\n hash_dup_free=" + hash_dup_free
;
}
}
|