01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: PreloadConfig.java,v 1.4.2.2 2008/01/07 15:14:08 cwl Exp $
07: */
08:
09: package com.sleepycat.je;
10:
11: /**
12: * Javadoc for this public class is generated
13: * via the doc templates in the doc_src directory.
14: */
15: public class PreloadConfig implements Cloneable {
16:
17: /*
18: * An instance created using the default constructor is initialized with
19: * the system's default settings.
20: */
21: public static final PreloadConfig DEFAULT = new PreloadConfig();
22:
23: private long maxBytes;
24: private long maxMillisecs;
25: private boolean loadLNs;
26:
27: /**
28: * Javadoc for this public method is generated via
29: * the doc templates in the doc_src directory.
30: */
31: public PreloadConfig() {
32: }
33:
34: /**
35: * Javadoc for this public method is generated via
36: * the doc templates in the doc_src directory.
37: */
38: public void setMaxBytes(long maxBytes) {
39: this .maxBytes = maxBytes;
40: }
41:
42: /**
43: * Javadoc for this public method is generated via
44: * the doc templates in the doc_src directory.
45: */
46: public long getMaxBytes() {
47: return maxBytes;
48: }
49:
50: /**
51: * Javadoc for this public method is generated via
52: * the doc templates in the doc_src directory.
53: */
54: public void setMaxMillisecs(long maxMillisecs) {
55: this .maxMillisecs = maxMillisecs;
56: }
57:
58: /**
59: * Javadoc for this public method is generated via
60: * the doc templates in the doc_src directory.
61: */
62: public long getMaxMillisecs() {
63: return maxMillisecs;
64: }
65:
66: /**
67: * Javadoc for this public method is generated via
68: * the doc templates in the doc_src directory.
69: */
70: public void setLoadLNs(boolean loadLNs) {
71: this .loadLNs = loadLNs;
72: }
73:
74: /**
75: * Javadoc for this public method is generated via
76: * the doc templates in the doc_src directory.
77: */
78: public boolean getLoadLNs() {
79: return loadLNs;
80: }
81:
82: /**
83: * Used by Database to create a copy of the application
84: * supplied configuration. Done this way to provide non-public cloning.
85: */
86: DatabaseConfig cloneConfig() {
87: try {
88: return (DatabaseConfig) super .clone();
89: } catch (CloneNotSupportedException willNeverOccur) {
90: return null;
91: }
92: }
93: }
|