001: /*-
002: * See the file LICENSE for redistribution information.
003: *
004: * Copyright (c) 2002,2008 Oracle. All rights reserved.
005: *
006: * $Id: PreloadStats.java,v 1.4.2.2 2008/01/07 15:14:08 cwl Exp $
007: */
008:
009: package com.sleepycat.je;
010:
011: import java.io.Serializable;
012:
013: /**
014: * Javadoc for this public class is generated
015: * via the doc templates in the doc_src directory.
016: */
017: public class PreloadStats implements Serializable {
018:
019: /**
020: * The number of INs, BINs, LNs, DINs, DBINs, and DupCountLNs loaded
021: * during the preload() operation.
022: */
023: public int nINsLoaded;
024: public int nBINsLoaded;
025: public int nLNsLoaded;
026: public int nDINsLoaded;
027: public int nDBINsLoaded;
028: public int nDupCountLNsLoaded;
029:
030: /**
031: * The status of the preload() operation.
032: */
033: public PreloadStatus status;
034:
035: /**
036: * Internal use only.
037: */
038: public PreloadStats() {
039: reset();
040: }
041:
042: /**
043: * Resets all stats.
044: */
045: private void reset() {
046: nINsLoaded = 0;
047: nBINsLoaded = 0;
048: nLNsLoaded = 0;
049: nDINsLoaded = 0;
050: nDBINsLoaded = 0;
051: nDupCountLNsLoaded = 0;
052: status = PreloadStatus.SUCCESS;
053: }
054:
055: /**
056: * Javadoc for this public method is generated via
057: * the doc templates in the doc_src directory.
058: */
059: public int getNINsLoaded() {
060: return nINsLoaded;
061: }
062:
063: /**
064: * Javadoc for this public method is generated via
065: * the doc templates in the doc_src directory.
066: */
067: public int getNBINsLoaded() {
068: return nBINsLoaded;
069: }
070:
071: /**
072: * Javadoc for this public method is generated via
073: * the doc templates in the doc_src directory.
074: */
075: public int getNLNsLoaded() {
076: return nLNsLoaded;
077: }
078:
079: /**
080: * Javadoc for this public method is generated via
081: * the doc templates in the doc_src directory.
082: */
083: public int getNDINsLoaded() {
084: return nDINsLoaded;
085: }
086:
087: /**
088: * Javadoc for this public method is generated via
089: * the doc templates in the doc_src directory.
090: */
091: public int getNDBINsLoaded() {
092: return nDBINsLoaded;
093: }
094:
095: /**
096: * Javadoc for this public method is generated via
097: * the doc templates in the doc_src directory.
098: */
099: 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 toString() {
165: StringBuffer sb = new StringBuffer();
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: }
|