KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > PreloadStats


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: PreloadStats.java,v 1.4 2006/10/30 21:14:12 bostic Exp $
7  */

8
9 package com.sleepycat.je;
10
11 import java.io.Serializable JavaDoc;
12
13 /**
14  * Javadoc for this public class is generated
15  * via the doc templates in the doc_src directory.
16  */

17 public class PreloadStats implements Serializable JavaDoc {
18
19     /**
20      * The number of INs, BINs, LNs, DINs, DBINs, and DupCountLNs loaded
21      * during the preload() operation.
22      */

23     public int nINsLoaded;
24     public int nBINsLoaded;
25     public int nLNsLoaded;
26     public int nDINsLoaded;
27     public int nDBINsLoaded;
28     public int nDupCountLNsLoaded;
29
30     /**
31      * The status of the preload() operation.
32      */

33     public PreloadStatus status;
34
35     /**
36      * Internal use only.
37      */

38     public PreloadStats() {
39         reset();
40     }
41
42     /**
43      * Resets all stats.
44      */

45     private void reset() {
46     nINsLoaded = 0;
47     nBINsLoaded = 0;
48     nLNsLoaded = 0;
49     nDINsLoaded = 0;
50     nDBINsLoaded = 0;
51     nDupCountLNsLoaded = 0;
52     status = PreloadStatus.SUCCESS;
53     }
54
55     /**
56      * Javadoc for this public method is generated via
57      * the doc templates in the doc_src directory.
58      */

59     public int getNINsLoaded() {
60         return nINsLoaded;
61     }
62
63     /**
64      * Javadoc for this public method is generated via
65      * the doc templates in the doc_src directory.
66      */

67     public int getNBINsLoaded() {
68         return nBINsLoaded;
69     }
70
71     /**
72      * Javadoc for this public method is generated via
73      * the doc templates in the doc_src directory.
74      */

75     public int getNLNsLoaded() {
76         return nLNsLoaded;
77     }
78
79     /**
80      * Javadoc for this public method is generated via
81      * the doc templates in the doc_src directory.
82      */

83     public int getNDINsLoaded() {
84         return nDINsLoaded;
85     }
86
87     /**
88      * Javadoc for this public method is generated via
89      * the doc templates in the doc_src directory.
90      */

91     public int getNDBINsLoaded() {
92         return nDBINsLoaded;
93     }
94
95     /**
96      * Javadoc for this public method is generated via
97      * the doc templates in the doc_src directory.
98      */

99     public int getNDupCountLNsLoaded() {
100         return nDupCountLNsLoaded;
101     }
102
103     /**
104      * Javadoc for this public method is generated via
105      * the doc templates in the doc_src directory.
106      */

107     public PreloadStatus getStatus() {
108         return status;
109     }
110
111     /**
112      * Internal use only.
113      */

114     public void setNINsLoaded(int nINsLoaded) {
115         this.nINsLoaded = nINsLoaded;
116     }
117
118     /**
119      * Internal use only.
120      */

121     public void setNBINsLoaded(int nBINsLoaded) {
122         this.nBINsLoaded = nBINsLoaded;
123     }
124
125     /**
126      * Internal use only.
127      */

128     public void setNLNsLoaded(int nLNsLoaded) {
129         this.nLNsLoaded = nLNsLoaded;
130     }
131
132     /**
133      * Internal use only.
134      */

135     public void setNDINsLoaded(int nDINsLoaded) {
136         this.nDINsLoaded = nDINsLoaded;
137     }
138
139     /**
140      * Internal use only.
141      */

142     public void setNDBINsLoaded(int nDBINsLoaded) {
143         this.nDBINsLoaded = nDBINsLoaded;
144     }
145
146     /**
147      * Internal use only.
148      */

149     public void setNDupCountLNsLoaded(int nDupCountLNsLoaded) {
150         this.nDupCountLNsLoaded = nDupCountLNsLoaded;
151     }
152
153     /**
154      * Internal use only.
155      */

156     public void setStatus(PreloadStatus status) {
157         this.status = status;
158     }
159
160     /**
161      * Javadoc for this public method is generated via
162      * the doc templates in the doc_src directory.
163      */

164     public String JavaDoc toString() {
165         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
166     sb.append("status=").append(status).append('\n');
167     sb.append("nINsLoaded=").append(nINsLoaded).append('\n');
168     sb.append("nBINsLoaded=").append(nBINsLoaded).append('\n');
169     sb.append("nLNsLoaded=").append(nLNsLoaded).append('\n');
170     sb.append("nDINsLoaded=").append(nDINsLoaded).append('\n');
171     sb.append("nDBINsLoaded=").append(nDBINsLoaded).append('\n');
172     sb.append("nDupCountLNsLoaded=").append(nDupCountLNsLoaded).
173         append('\n');
174
175         return sb.toString();
176     }
177 }
178
Popular Tags