1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002, 2014 Oracle and/or its affiliates.  All rights reserved.
5  *
6  */
7 
8 package com.sleepycat.je.config;
9 
10 import java.util.HashMap;
11 import java.util.Map;
12 import java.util.logging.Level;
13 
14 import com.sleepycat.je.Durability;
15 import com.sleepycat.je.EnvironmentConfig;
16 
17 /**
18  */
19 public class EnvironmentParams {
20 
21     /* The prefix for all JE replication parameters. */
22     public static final String REP_PARAM_PREFIX = "je.rep.";
23 
24     /*
25      * The map of supported environment parameters where the key is parameter
26      * name and the data is the configuration parameter object. Put first,
27      * before any declarations of ConfigParams.
28      */
29     public final static Map<String, ConfigParam> SUPPORTED_PARAMS =
30         new HashMap<String, ConfigParam>();
31 
32     /*
33      * Only environment parameters that are part of the public API are
34      * represented by String constants in EnvironmentConfig.
35      */
36     public static final LongConfigParam MAX_MEMORY =
37         new LongConfigParam(EnvironmentConfig.MAX_MEMORY,
38                             null,           // min
39                             null,           // max
40                             Long.valueOf(0),// default uses je.maxMemoryPercent
41                             true,           // mutable
42                             false);         // forReplication
43 
44     public static final IntConfigParam MAX_MEMORY_PERCENT =
45         new IntConfigParam(EnvironmentConfig.MAX_MEMORY_PERCENT,
46                            Integer.valueOf(1),  // min
47                            Integer.valueOf(90), // max
48                            Integer.valueOf(60), // default
49                            true,                // mutable
50                            false);              // forReplication
51 
52     public static final BooleanConfigParam ENV_SHARED_CACHE =
53         new BooleanConfigParam(EnvironmentConfig.SHARED_CACHE,
54                                false,         // default
55                                false,         // mutable
56                                false);        // forReplication
57 
58     /**
59      * Used by utilities, not exposed in the API.
60      *
61      * If true, even when recovery is not run (see ENV_RECOVERY) by a utility,
62      * the btree and dup comparators will be instantiated.  Set to true by
63      * utilities such as DbScavenger that need comparators in spite of not
64      * needing recovery.
65      */
66     public static final BooleanConfigParam ENV_COMPARATORS_REQUIRED =
67         new BooleanConfigParam("je.env.comparatorsRequired",
68                                false,         // default
69                                false,         // mutable
70                                false);        // forReplication
71 
72     /**
73      * Used by utilities, not exposed in the API.
74      *
75      * If true, an environment is created with recovery and the related daemon
76      * threads are enabled.
77      */
78     public static final BooleanConfigParam ENV_RECOVERY =
79         new BooleanConfigParam("je.env.recovery",
80                                true,          // default
81                                false,         // mutable
82                                false);        // forReplication
83 
84     public static final BooleanConfigParam ENV_RECOVERY_FORCE_CHECKPOINT =
85         new BooleanConfigParam(EnvironmentConfig.ENV_RECOVERY_FORCE_CHECKPOINT,
86                                false,         // default
87                                false,         // mutable
88                                false);        // forReplication
89 
90     public static final BooleanConfigParam ENV_RECOVERY_FORCE_NEW_FILE =
91         new BooleanConfigParam(EnvironmentConfig.ENV_RECOVERY_FORCE_NEW_FILE,
92                                false,         // default
93                                false,         // mutable
94                                false);        // forReplication
95 
96     public static final BooleanConfigParam
97         HALT_ON_COMMIT_AFTER_CHECKSUMEXCEPTION =
98             new BooleanConfigParam
99                 (EnvironmentConfig.HALT_ON_COMMIT_AFTER_CHECKSUMEXCEPTION,
100                  false,         // default
101                  false,         // mutable
102                  false);        // forReplication
103 
104     public static final BooleanConfigParam ENV_RUN_INCOMPRESSOR =
105         new BooleanConfigParam(EnvironmentConfig.ENV_RUN_IN_COMPRESSOR,
106                                true,          // default
107                                true,          // mutable
108                                false);        // forReplication
109 
110     /**
111      * If true, eviction is also done by a pool of evictor threads, as well as
112      * being done inline by application threads. If false, the evictor pool
113      * is not used, regardless of the values of je.evictor.coreThreads and
114      * je.evictor.maxThreads.
115      */
116     public static final BooleanConfigParam ENV_RUN_EVICTOR =
117         new BooleanConfigParam(EnvironmentConfig.ENV_RUN_EVICTOR,
118                                true,         // default
119                                true,         // mutable
120                                false);       // forReplication
121 
122     /**
123      * If true, a new evictor is used, which is more efficient and does a
124      * better aproximation of an LRU policy than the old evictor. Eventually,
125      * the old evictor will be completely removed, and when that happens,
126      * this parameter will also be removed.
127      */
128     public static final BooleanConfigParam ENV_USE_NEW_EVICTOR =
129         new BooleanConfigParam("je.env.useNewEvictor",
130                                true,         // default
131                                false,        // mutable
132                                false);       // forReplication
133 
134     public static final BooleanConfigParam ENV_DUP_CONVERT_PRELOAD_ALL =
135         new BooleanConfigParam(EnvironmentConfig.ENV_DUP_CONVERT_PRELOAD_ALL,
136                                true,         // default
137                                false,        // mutable
138                                false);       // forReplication
139 
140     /**
141      * @deprecated as of JE 4.1
142      */
143     public static final DurationConfigParam EVICTOR_WAKEUP_INTERVAL =
144         new DurationConfigParam("je.evictor.wakeupInterval",
145                                 "1 s",                 // min
146                                 "75 min",              // max
147                                 "5 s",                 // default
148                                 false,                 // mutable
149                                 false);
150 
151     public static final IntConfigParam EVICTOR_CORE_THREADS =
152         new IntConfigParam(EnvironmentConfig.EVICTOR_CORE_THREADS,
153                             Integer.valueOf(0),             // min
154                             Integer.valueOf(Integer.MAX_VALUE), // max
155                             Integer.valueOf(1),             // default
156                             true,                           // mutable
157                             false);                         // forReplication
158 
159     public static final IntConfigParam EVICTOR_MAX_THREADS =
160         new IntConfigParam(EnvironmentConfig.EVICTOR_MAX_THREADS,
161                             Integer.valueOf(1),             // min
162                             Integer.valueOf(Integer.MAX_VALUE), // max
163                             Integer.valueOf(10),             // default
164                             true,                           // mutable
165                             false);                         // forReplication
166 
167     public static final DurationConfigParam EVICTOR_KEEP_ALIVE =
168         new DurationConfigParam(EnvironmentConfig.EVICTOR_KEEP_ALIVE,
169                                 "1 s",          // min
170                                 "24 h",         // max
171                                 "10 min",       // default
172                                 true,           // mutable
173                                 false);         // forReplication
174 
175     /**
176      * The amount of time to wait for the eviction pool to terminate, in order
177      * to create a clean shutdown. An intentionally unadvertised parameter, of
178      * use mainly for unit test cleanup.
179      */
180     public static final DurationConfigParam EVICTOR_TERMINATE_TIMEOUT =
181         new DurationConfigParam("je.env.terminateTimeout",
182                                 "1 ms",         // min
183                                 "60 s",         // max
184                                 "10 s",         // default
185                                 true,           // mutable
186                                 false);         // forReplication
187 
188     public static final BooleanConfigParam EVICTOR_ALLOW_BIN_DELTAS =
189         new BooleanConfigParam(EnvironmentConfig.EVICTOR_ALLOW_BIN_DELTAS,
190                                true,         // default
191                                false,        // mutable
192                                false);       // forReplication
193 
194     /*
195      * Not exposed in the API because we expect that BIN mutation will
196      * always be beneficial. Intended only for debugging and testing.
197      */
198     public static final BooleanConfigParam EVICTOR_MUTATE_BINS =
199         new BooleanConfigParam("je.evictor.mutateBins",
200                                true,         // default
201                                false,        // mutable
202                                false);       // forReplication
203 
204     public static final BooleanConfigParam ENV_RUN_CHECKPOINTER =
205         new BooleanConfigParam(EnvironmentConfig.ENV_RUN_CHECKPOINTER,
206                                true,        // default
207                                true,        // mutable
208                                false);      // forReplication
209 
210     public static final BooleanConfigParam ENV_RUN_CLEANER =
211         new BooleanConfigParam(EnvironmentConfig.ENV_RUN_CLEANER,
212                                true,        // default
213                                true,        // mutable
214                                false);      // forReplication
215 
216     public static final IntConfigParam ENV_BACKGROUND_READ_LIMIT =
217         new IntConfigParam(EnvironmentConfig.ENV_BACKGROUND_READ_LIMIT,
218                             Integer.valueOf(0),                 // min
219                             Integer.valueOf(Integer.MAX_VALUE), // max
220                             Integer.valueOf(0),                 // default
221                             true,                           // mutable
222                             false);                         // forReplication
223 
224     public static final IntConfigParam ENV_BACKGROUND_WRITE_LIMIT =
225         new IntConfigParam(EnvironmentConfig.ENV_BACKGROUND_WRITE_LIMIT,
226                             Integer.valueOf(0),                 // min
227                             Integer.valueOf(Integer.MAX_VALUE), // max
228                             Integer.valueOf(0),                 // default
229                             true,                           // mutable
230                             false);                         // forReplication
231 
232     public static final DurationConfigParam ENV_BACKGROUND_SLEEP_INTERVAL =
233         new DurationConfigParam
234             (EnvironmentConfig.ENV_BACKGROUND_SLEEP_INTERVAL,
235                                "1 ms",          // min
236                                null,            // max
237                                "1 ms",          // default
238                                true,            // mutable
239                                false);          // forReplication
240 
241     public static final BooleanConfigParam ENV_CHECK_LEAKS =
242         new BooleanConfigParam(EnvironmentConfig.ENV_CHECK_LEAKS,
243                                true,              // default
244                                false,             // mutable
245                                false);            // forReplication
246 
247     public static final BooleanConfigParam ENV_FORCED_YIELD =
248         new BooleanConfigParam(EnvironmentConfig.ENV_FORCED_YIELD,
249                                false,             // default
250                                false,             // mutable
251                                false);            // forReplication
252 
253     public static final BooleanConfigParam ENV_INIT_TXN =
254         new BooleanConfigParam(EnvironmentConfig.ENV_IS_TRANSACTIONAL,
255                                false,             // default
256                                false,             // mutable
257                                false);            // forReplication
258 
259     public static final BooleanConfigParam ENV_INIT_LOCKING =
260         new BooleanConfigParam(EnvironmentConfig.ENV_IS_LOCKING,
261                                true,              // default
262                                false,             // mutable
263                                false);            // forReplication
264 
265     public static final BooleanConfigParam ENV_RDONLY =
266         new BooleanConfigParam(EnvironmentConfig.ENV_READ_ONLY,
267                                false,             // default
268                                false,             // mutable
269                                false);            // forReplication
270 
271     public static final BooleanConfigParam ENV_FAIR_LATCHES =
272         new BooleanConfigParam(EnvironmentConfig.ENV_FAIR_LATCHES,
273                                false,             // default
274                                false,             // mutable
275                                false);            // forReplication
276 
277     /**
278      * Not part of the public API. As of 3.3, is true by default.  As of 6.0,
279      * it is no longer used (and latches are always shared when possible).
280      * The param is left in place just to avoid errors from config settings.
281      */
282     public static final BooleanConfigParam ENV_SHARED_LATCHES =
283         new BooleanConfigParam("je.env.sharedLatches",
284                                true,             // default
285                                false,            // mutable
286                                false);           // forReplication
287 
288     public static final DurationConfigParam ENV_LATCH_TIMEOUT =
289         new DurationConfigParam(EnvironmentConfig.ENV_LATCH_TIMEOUT,
290             "1 ms",            // min
291             null,              // max
292             "5 min",           // default
293             false,             // mutable
294             false);            // forReplication
295 
296     public static final BooleanConfigParam ENV_DB_EVICTION =
297         new BooleanConfigParam(EnvironmentConfig.ENV_DB_EVICTION,
298                                true,             // default
299                                false,            // mutable
300                                false);           // forReplication
301 
302     public static final IntConfigParam ADLER32_CHUNK_SIZE =
303         new IntConfigParam(EnvironmentConfig.ADLER32_CHUNK_SIZE,
304                            Integer.valueOf(0),       // min
305                            Integer.valueOf(1 << 20), // max
306                            Integer.valueOf(0),       // default
307                            true,                 // mutable
308                            false);               // forReplication
309 
310     /*
311      * Database Logs
312      */
313     /* default: 2k * NUM_LOG_BUFFERS */
314     public static final int MIN_LOG_BUFFER_SIZE = 2048;
315     public static final int NUM_LOG_BUFFERS_DEFAULT = 3;
316     public static final long LOG_MEM_SIZE_MIN =
317         NUM_LOG_BUFFERS_DEFAULT * MIN_LOG_BUFFER_SIZE;
318     public static final String LOG_MEM_SIZE_MIN_STRING =
319         Long.toString(LOG_MEM_SIZE_MIN);
320 
321     public static final LongConfigParam LOG_MEM_SIZE =
322         new LongConfigParam(EnvironmentConfig.LOG_TOTAL_BUFFER_BYTES,
323                             Long.valueOf(LOG_MEM_SIZE_MIN),// min
324                             null,              // max
325                             Long.valueOf(0),       // by default computed
326                                                // from je.maxMemory
327                             false,             // mutable
328                             false);            // forReplication
329 
330     public static final IntConfigParam NUM_LOG_BUFFERS =
331         new IntConfigParam(EnvironmentConfig.LOG_NUM_BUFFERS,
332                            Integer.valueOf(2),     // min
333                            null,               // max
334                            Integer.valueOf(NUM_LOG_BUFFERS_DEFAULT), // default
335                            false,              // mutable
336                            false);             // forReplication
337 
338     public static final IntConfigParam LOG_BUFFER_MAX_SIZE =
339         new IntConfigParam(EnvironmentConfig.LOG_BUFFER_SIZE,
340                            Integer.valueOf(1<<10),  // min
341                            null,                // max
342                            Integer.valueOf(1<<20),  // default
343                            false,               // mutable
344                            false);              // forReplication
345 
346     public static final IntConfigParam LOG_FAULT_READ_SIZE =
347         new IntConfigParam(EnvironmentConfig.LOG_FAULT_READ_SIZE,
348                            Integer.valueOf(32),   // min
349                            null,              // max
350                            Integer.valueOf(2048), // default
351                            false,             // mutable
352                            false);            // forReplication
353 
354     public static final IntConfigParam LOG_ITERATOR_READ_SIZE =
355         new IntConfigParam(EnvironmentConfig.LOG_ITERATOR_READ_SIZE,
356                            Integer.valueOf(128),  // min
357                            null,              // max
358                            Integer.valueOf(8192), // default
359                            false,             // mutable
360                            false);            // forReplication
361 
362     public static final IntConfigParam LOG_ITERATOR_MAX_SIZE =
363         new IntConfigParam(EnvironmentConfig.LOG_ITERATOR_MAX_SIZE,
364                            Integer.valueOf(128),  // min
365                            null,              // max
366                            Integer.valueOf(16777216), // default
367                            false,             // mutable
368                            false);            // forReplication
369 
370     public static final LongConfigParam LOG_FILE_MAX =
371         new LongConfigParam(EnvironmentConfig.LOG_FILE_MAX,
372                             Long.valueOf(1000000),      // min
373                             Long.valueOf(1073741824L), // max
374                             Long.valueOf(10000000),    // default
375                             false,                 // mutable
376                             false);                // forReplication
377 
378     public static final IntConfigParam LOG_N_DATA_DIRECTORIES =
379         new IntConfigParam(EnvironmentConfig.LOG_N_DATA_DIRECTORIES,
380                            Integer.valueOf(0),    // min
381                            Integer.valueOf(256),  // max
382                            Integer.valueOf(0),    // default
383                            false,                 // mutable
384                            false);                // forReplication
385 
386     public static final BooleanConfigParam LOG_CHECKSUM_READ =
387         new BooleanConfigParam(EnvironmentConfig.LOG_CHECKSUM_READ,
388                                true,               // default
389                                false,              // mutable
390                                false);             // forReplication
391 
392     public static final BooleanConfigParam LOG_VERIFY_CHECKSUMS =
393         new BooleanConfigParam(EnvironmentConfig.LOG_VERIFY_CHECKSUMS,
394                                false,              // default
395                                false,              // mutable
396                                false);             // forReplication
397 
398     public static final BooleanConfigParam LOG_MEMORY_ONLY =
399         new BooleanConfigParam(EnvironmentConfig.LOG_MEM_ONLY,
400                                false,              // default
401                                false,              // mutable
402                                false);             // forReplication
403 
404     public static final IntConfigParam LOG_FILE_CACHE_SIZE =
405         new IntConfigParam(EnvironmentConfig.LOG_FILE_CACHE_SIZE,
406                            Integer.valueOf(3),    // min
407                            null,                  // max
408                            Integer.valueOf(100),  // default
409                            false,                 // mutable
410                            false);                // forReplication
411 
412     /**
413      * This is experimental and pending performance tests. Javadoc and change
414      * log are commented out below, and can be used if we decide to use this.
415      */
416     public static final IntConfigParam LOG_FILE_WARM_UP_SIZE =
417         new IntConfigParam("je.log.fileWarmUpSize",
418             Integer.valueOf(0),    // min
419             null,                  // max
420             Integer.valueOf(0),    // default
421             false,                 // mutable
422             false);                // forReplication
423 
424     /**
425      * This is experimental and pending performance tests. Javadoc and change
426      * log are commented out below, and can be used if we decide to use this.
427      */
428     public static final IntConfigParam LOG_FILE_WARM_UP_BUF_SIZE =
429         new IntConfigParam("je.log.fileWarmUpReadSize",
430             Integer.valueOf(128),      // min
431             null,                      // max
432             Integer.valueOf(10485760), // default
433             false,                     // mutable
434             false);                    // forReplication
435 
436     /**
437      * The size in MiB to be read sequentially at the end of the log in order
438      * to warm the file system cache.
439      * <p>
440      * Making use of sequential reads to warm the file system cache has the
441      * benefit of reducing random reads caused by CRUD operations, and thereby
442      * increasing throughput and latency for these operations. This is
443      * especially true during the initial period after opening an Environment,
444      * when CRUD operations must fetch Btree internal nodes from the file
445      * system in order to populate the JE cache. The fetches due to JE cache
446      * misses typically cause random reads. Often the Btree internal nodes that
447      * are needed appear close to the end of the log because they were written
448      * fairly recently by checkpoints, and this is why warming the cache with
449      * the data at the end of the log is often beneficial.
450      * <p>
451      * The warm-up occurs concurrently with recovery when an Environment is
452      * opened. It may finish before recovery finishes, or continue after
453      * recovery finishes when recovery is brief. In the latter case, the
454      * warm-up is concurrent with the application's CRUD operations. A
455      * dedicated thread is used for the warm-up, and this thread is destroyed
456      * when warm-up is complete.
457      * <p>
458      * Recovery itself will perform at least a partial warm-up implicitly,
459      * since it reads the log (sequentially), and in fact it may read more than
460      * the configured warm-up size. The warm-up thread will only read the
461      * portion of the log not being read by recovery, and only when the warm-up
462      * size is larger than the size read by recovery (i.e., it reads the
463      * difference between these two sizes).
464      * <p>
465      * The size read by recovery is dependent on whether the Environment was
466      * previously closed cleanly (a crash did not occur and the application
467      * called Environment.close), and on the size of the last complete
468      * checkpoint. When the environment is closed cleanly with a small
469      * checkpoint, recovery will only read a small portion of the log, and in
470      * this case the additional reads performed by the warm-up thread can be
471      * very beneficial.
472      * <p>
473      * If the warm-up size is larger than the amount of memory available to the
474      * file system cache, then the warm-up may be counter productive, although
475      * TODO: change text below or change default to 1024
476      * the default warm-up size (1 GiB) was chosen to avoid this problem in
477      * most cases. Applications are advised to change the warm-up size based on
478      * knowledge of the amount of physical memory on the machine and how much
479      * is expected to be available as file system cache. The warm-up may be
480      * disabled by setting the warm-up size to zero, although of course
481      * recovery will continue to do some amount of warm-up implicitly.
482      * <p>
483      * The warm-up thread performs read operations using a single buffer and it
484      * reads as much as will fit in the buffer at a time. The size of the
485      * buffer, and therefore the maximum size of each read, is {@link
486      * #LOG_FILE_WARM_UP_READ_SIZE}. Files are read in the reverse of the order
487      * they were written.
488      *
489      * <p><table border="1">
490      * <tr><td>Name</td><td>Type</td><td>Mutable</td>
491      * <td>Default</td><td>Minimum</td><td>Maximum</td></tr>
492      * <tr>
493      * <td>{@value}</td>
494      * <td>Integer</td>
495      * <td>No</td>
496      * <td>0</td>
497      * <td>0</td>
498      * <td>-none-</td>
499      * </tr>
500      * </table></p>
501     public static final String LOG_FILE_WARM_UP_SIZE = "je.log.fileWarmUpSize";
502      */
503 
504     /**
505      * The read buffer size for warming the file system cache; see {@link
506      * #LOG_FILE_WARM_UP_SIZE}.
507      *
508      * Because the warm-up can be concurrent with application CRUD operations,
509      * it is important that a large buffer size be used for reading the data
510      * files during the warm-up. That way, the warm-up is performed using
511      * sequential reads to a large degree, even though CRUD operations may
512      * cause some random I/O. Sequential reads are required to obtain the
513      * performance benefit of the warm-up.
514      * <p>
515      * Note that this buffer is allocated outside of the JE cache, so the Java
516      * heap size must be set accordingly.
517      * <p>
518      * The default value, 10 MiB, is designed to reduce random I/O to some
519      * degree. It should be made larger to perform the warm-up more quickly,
520      * especially if there are many application threads performing CRUD
521      * operations. In our tests, using a value of 100 MiB minimized the time to
522      * complete the warm-up while 20 threads performed CRUD operations.
523      *
524      * <p><table border="1">
525      * <tr><td>Name</td><td>Type</td><td>Mutable</td>
526      * <td>Default</td><td>Minimum</td><td>Maximum</td></tr>
527      * <tr>
528      * <td>{@value}</td>
529      * <td>Integer</td>
530      * <td>No</td>
531      * <td>10485760 (10 MiB)</td>
532      * <td>128</td>
533      * <td>-none-</td>
534      * </tr>
535      * </table></p>
536     public static final String LOG_FILE_WARM_UP_READ_SIZE =
537         "je.log.fileWarmUpReadSize";
538      */
539 
540     /* Future change log entry for above feature: (adjust for default value)
541     <li>
542     JE now warms the file system cache at startup by sequentially reading at least
543     1 GiB (by default) at the end of the data log, even if this amount is not read
544     by recovery.
545     <p>
546     Making use of sequential reads to warm the file system cache has the
547     benefit of reducing random reads caused by CRUD operations, and thereby
548     increasing throughput and latency for these operations. This is
549     especially true during the initial period after opening an Environment,
550     when CRUD operations must fetch Btree internal nodes from the file
551     system in order to populate the JE cache. The fetches due to JE cache
552     misses typically cause random reads. Often the Btree internal nodes that
553     are needed appear close to the end of the log because they were written
554     fairly recently by checkpoints, and this is why warming the cache with
555     the data at the end of the log is often beneficial.
556     <p>
557     A new config param, EnvironmentConfig.LOG_FILE_WARM_UP_SIZE, can be modified to
558     change the size of the log read during warm-up, or to disable the warm-up. See
559     the javadoc for this parameter for details on the warm-up behavior.  Another
560     new parameter, EnvironmentConfig.LOG_FILE_WARM_UP_READ_SIZE, provides control
561     over the buffer size for the warm-up. Applications running with very small
562     heaps or very little memory available to the file system should disable the
563     warm-up or reduce these param values from their default settings.
564     <p>
565     [#23893] (6.2.27)
566     </li><br>
567     */
568 
569     public static final DurationConfigParam LOG_FSYNC_TIMEOUT =
570         new DurationConfigParam(EnvironmentConfig.LOG_FSYNC_TIMEOUT,
571                                 "10 ms",           // min
572                                 null,              // max
573                                 "500 ms",          // default
574                                 false,             // mutable
575                                 false);            // forReplication
576 
577     public static final DurationConfigParam LOG_GROUP_COMMIT_INTERVAL =
578         new DurationConfigParam(EnvironmentConfig.LOG_GROUP_COMMIT_INTERVAL,
579                                     "0 ns",        // min
580                                     null,          // max
581                                     "0 ns",        // default
582                                     false,         // mutable
583                                     false);        // forReplication
584 
585     public static final IntConfigParam LOG_GROUP_COMMIT_THRESHOLD =
586         new IntConfigParam(EnvironmentConfig.LOG_GROUP_COMMIT_THRESHOLD,
587                                Integer.valueOf(0), // min
588                                null,               // max
589                                Integer.valueOf(0), // default
590                                false,              // mutable
591                                false);             // forReplication
592 
593     public static final BooleanConfigParam LOG_USE_ODSYNC =
594         new BooleanConfigParam(EnvironmentConfig.LOG_USE_ODSYNC,
595                                false,          // default
596                                false,          // mutable
597                                false);         // forReplication
598 
599     public static final BooleanConfigParam LOG_USE_NIO =
600         new BooleanConfigParam(EnvironmentConfig.LOG_USE_NIO,
601                                false,          // default
602                                false,          // mutable
603                                false);         // forReplication
604 
605     public static final BooleanConfigParam LOG_USE_WRITE_QUEUE =
606         new BooleanConfigParam(EnvironmentConfig.LOG_USE_WRITE_QUEUE,
607                                true,           // default
608                                false,          // mutable
609                                false);         // forReplication
610 
611     public static final IntConfigParam LOG_WRITE_QUEUE_SIZE =
612         new IntConfigParam(EnvironmentConfig.LOG_WRITE_QUEUE_SIZE,
613                            Integer.valueOf(1 << 12),    // min (4KB)
614                            Integer.valueOf(1 << 28),    // max (32MB)
615                            Integer.valueOf(1 << 20),    // default (1MB)
616                            false,             // mutable
617                            false);            // forReplication
618 
619     public static final BooleanConfigParam LOG_DIRECT_NIO =
620         new BooleanConfigParam(EnvironmentConfig.LOG_DIRECT_NIO,
621                                false,          // default
622                                false,          // mutable
623                                false);         // forReplication
624 
625     public static final LongConfigParam LOG_CHUNKED_NIO =
626         new LongConfigParam(EnvironmentConfig.LOG_CHUNKED_NIO,
627                             Long.valueOf(0L),      // min
628                             Long.valueOf(1 << 26), // max (64M)
629                             Long.valueOf(0L),      // default (no chunks)
630                             false,             // mutable
631                             false);            // forReplication
632 
633     /**
634      * @deprecated As of 3.3, no longer used
635      *
636      * Optimize cleaner operation for temporary deferred write DBs.
637      */
638     public static final BooleanConfigParam LOG_DEFERREDWRITE_TEMP =
639         new BooleanConfigParam("je.deferredWrite.temp",
640                                false,          // default
641                                false,          // mutable
642                                false);         // forReplication
643 
644     /*
645      * Tree
646      */
647     public static final IntConfigParam NODE_MAX =
648         new IntConfigParam(EnvironmentConfig.NODE_MAX_ENTRIES,
649                            Integer.valueOf(4),     // min
650                            Integer.valueOf(32767), // max
651                            Integer.valueOf(128),   // default
652                            false,              // mutable
653                            false);             // forReplication
654 
655     public static final IntConfigParam NODE_MAX_DUPTREE =
656         new IntConfigParam(EnvironmentConfig.NODE_DUP_TREE_MAX_ENTRIES,
657                            Integer.valueOf(4),     // min
658                            Integer.valueOf(32767), // max
659                            Integer.valueOf(128),   // default
660                            false,              // mutable
661                            false);             // forReplication
662 
663     /**
664      * @deprecated as of JE 6.0
665      */
666     public static final IntConfigParam BIN_MAX_DELTAS =
667         new IntConfigParam(EnvironmentConfig.TREE_MAX_DELTA,
668                            Integer.valueOf(0),     // min
669                            Integer.valueOf(100),   // max
670                            Integer.valueOf(10),    // default
671                            false,              // mutable
672                            false);             // forReplication
673 
674     public static final IntConfigParam BIN_DELTA_PERCENT =
675         new IntConfigParam(EnvironmentConfig.TREE_BIN_DELTA,
676                            Integer.valueOf(0),     // min
677                            Integer.valueOf(75),    // max
678                            Integer.valueOf(25),    // default
679                            false,              // mutable
680                            false);             // forReplication
681 
682     /*
683      * Whether blind insertions are allowed in BIN-deltas (it is also used to
684      * determine the max number of slots when a delta is created).
685      */
686     public static final BooleanConfigParam BIN_DELTA_BLIND_OPS =
687         new BooleanConfigParam("je.tree.binDeltaBlindOps",
688                                true,         // default
689                                false,        // mutable
690                                false);       // forReplication
691 
692     /*
693      * Whether blind puts are allowed in BIN-deltas. Blind puts imply
694      * the storage of bloom filters in BIN-deltas.
695      */
696     public static final BooleanConfigParam BIN_DELTA_BLIND_PUTS =
697         new BooleanConfigParam("je.tree.binDeltaBlindPuts",
698                                true,         // default
699                                false,        // mutable
700                                false);       // forReplication
701 
702     public static final LongConfigParam MIN_TREE_MEMORY =
703         new LongConfigParam(EnvironmentConfig.TREE_MIN_MEMORY,
704                             Long.valueOf(50 * 1024),   // min
705                             null,                  // max
706                             Long.valueOf(500 * 1024),  // default
707                             true,                  // mutable
708                             false);                // forReplication
709 
710     public static final IntConfigParam TREE_COMPACT_MAX_KEY_LENGTH =
711         new IntConfigParam(EnvironmentConfig.TREE_COMPACT_MAX_KEY_LENGTH,
712                            Integer.valueOf(0),     // min
713                            Integer.valueOf(255),   // max
714                            Integer.valueOf(16),    // default
715                            false,              // mutable
716                            false);             // forReplication
717 
718     /*
719      * IN Compressor
720      */
721     public static final DurationConfigParam COMPRESSOR_WAKEUP_INTERVAL =
722         new DurationConfigParam(EnvironmentConfig.COMPRESSOR_WAKEUP_INTERVAL,
723                                 "1 s",                 // min
724                                 "75 min",              // max
725                                 "5 s",                 // default
726                                 false,                 // mutable
727                                 false);                // forReplication
728 
729     public static final IntConfigParam COMPRESSOR_RETRY =
730         new IntConfigParam(EnvironmentConfig.COMPRESSOR_DEADLOCK_RETRY,
731                            Integer.valueOf(0),                // min
732                            Integer.valueOf(Integer.MAX_VALUE),// max
733                            Integer.valueOf(3),                // default
734                            false,                         // mutable
735                            false);                        // forReplication
736 
737     public static final DurationConfigParam COMPRESSOR_LOCK_TIMEOUT =
738         new DurationConfigParam(EnvironmentConfig.COMPRESSOR_LOCK_TIMEOUT,
739                                 null,                  // min
740                                 "75 min",              // max
741                                 "500 ms",              // default
742                                 false,                 // mutable
743                                 false);                // forReplication
744 
745     /*
746      * Evictor
747      */
748     public static final LongConfigParam EVICTOR_EVICT_BYTES =
749         new LongConfigParam(EnvironmentConfig.EVICTOR_EVICT_BYTES,
750                              Long.valueOf(1024),       // min
751                              null,                 // max
752                              Long.valueOf(524288),     // default
753                              false,                // mutable
754                              false);               // forReplication
755 
756     /**
757      * @deprecated As of 2.0, this is replaced by je.evictor.evictBytes
758      *
759      * When eviction happens, the evictor will push memory usage to this
760      * percentage of je.maxMemory.
761      */
762     public static final IntConfigParam EVICTOR_USEMEM_FLOOR =
763         new IntConfigParam("je.evictor.useMemoryFloor",
764                            Integer.valueOf(50),        // min
765                            Integer.valueOf(100),       // max
766                            Integer.valueOf(95),        // default
767                            false,                  // mutable
768                            false);                 // forReplication
769 
770     /**
771      * @deprecated As of 1.7.2, this is replaced by je.evictor.nodesPerScan
772      *
773      * The evictor percentage of total nodes to scan per wakeup.
774      */
775     public static final IntConfigParam EVICTOR_NODE_SCAN_PERCENTAGE =
776         new IntConfigParam("je.evictor.nodeScanPercentage",
777                            Integer.valueOf(1),          // min
778                            Integer.valueOf(100),        // max
779                            Integer.valueOf(10),         // default
780                            false,                   // mutable
781                            false);                  // forReplication
782 
783     /**
784      * @deprecated As of 1.7.2, 1 node is chosen per scan.
785      *
786      * The evictor percentage of scanned nodes to evict per wakeup.
787      */
788     public static final
789         IntConfigParam EVICTOR_EVICTION_BATCH_PERCENTAGE =
790         new IntConfigParam("je.evictor.evictionBatchPercentage",
791                            Integer.valueOf(1),          // min
792                            Integer.valueOf(100),        // max
793                            Integer.valueOf(10),         // default
794                            false,                   // mutable
795                            false);                  // forReplication
796 
797     /**
798      * @deprecated as of JE 6.0
799      */
800     public static final IntConfigParam EVICTOR_NODES_PER_SCAN =
801         new IntConfigParam(EnvironmentConfig.EVICTOR_NODES_PER_SCAN,
802                            Integer.valueOf(1),           // min
803                            Integer.valueOf(1000),        // max
804                            Integer.valueOf(10),          // default
805                            false,                    // mutable
806                            false);                   // forReplication
807 
808     public static final IntConfigParam EVICTOR_CRITICAL_PERCENTAGE =
809         new IntConfigParam(EnvironmentConfig.EVICTOR_CRITICAL_PERCENTAGE,
810                            Integer.valueOf(0),           // min
811                            Integer.valueOf(1000),        // max
812                            Integer.valueOf(0),           // default
813                            false,                    // mutable
814                            false);                   // forReplication
815 
816     /**
817      * @deprecated as of JE 4.1
818      */
819     public static final IntConfigParam EVICTOR_RETRY =
820         new IntConfigParam(EnvironmentConfig.EVICTOR_DEADLOCK_RETRY,
821                            Integer.valueOf(0),                // min
822                            Integer.valueOf(Integer.MAX_VALUE),// max
823                            Integer.valueOf(3),                // default
824                            false,                         // mutable
825                            false);                        // forReplication
826 
827     /**
828      * @deprecated as of JE 6.0
829      */
830     public static final BooleanConfigParam EVICTOR_LRU_ONLY =
831         new BooleanConfigParam(EnvironmentConfig.EVICTOR_LRU_ONLY,
832                                true,                  // default
833                                false,                 // mutable
834                                false);                // forReplication
835 
836     /**
837      * If true (the default), use a 2-level LRU policy that aims to keep
838      * dirty BTree nodes in memory at the expense of potentially hotter
839      * clean nodes. Specifically, a node that is selected for eviction from
840      * level-1 will be moved to level-2 if it is dirty. Nodes in level-2 are
841      * considered for eviction only after all nodes in level-1 have been
842      * considered. Dirty nodes that are in level-2 are moved back to level-1
843      * when they get cleaned.
844      * <p>
845      * This parameter applies to the new evictor only.
846      *
847      * <p><table border="1">
848      * <tr><td>Name</td><td>Type</td><td>Mutable</td><td>Default</td></tr>
849      * <tr>
850      * <td>{@value}</td>
851      * <td>Boolean</td>
852      * <td>No</td>
853      * <td>true</td>
854      * </tr>
855      * </table></p>
856      */
857     public static final BooleanConfigParam EVICTOR_USE_DIRTY_LRU =
858         new BooleanConfigParam("je.evictor.useDirtyLRU",
859                                true,                  // default
860                                false,                 // mutable
861                                false);                // forReplication
862 
863     public static final IntConfigParam EVICTOR_N_LRU_LISTS =
864         new IntConfigParam(EnvironmentConfig.EVICTOR_N_LRU_LISTS,
865                            Integer.valueOf(1),       // min
866                            Integer.valueOf(32),      // max
867                            Integer.valueOf(4),       // default
868                            false,                    // mutable
869                            false);                   // forReplication
870 
871     public static final BooleanConfigParam EVICTOR_FORCED_YIELD =
872         new BooleanConfigParam(EnvironmentConfig.EVICTOR_FORCED_YIELD,
873                                false,             // default
874                                false,             // mutable
875                                false);            // forReplication
876 
877     /*
878      * Checkpointer
879      */
880     public static final LongConfigParam CHECKPOINTER_BYTES_INTERVAL =
881         new LongConfigParam(EnvironmentConfig.CHECKPOINTER_BYTES_INTERVAL,
882                             Long.valueOf(0),               // min
883                             Long.valueOf(Long.MAX_VALUE),  // max
884                             Long.valueOf(20000000),        // default
885                             false,                     // mutable
886                             false);                    // forReplication
887 
888     public static final DurationConfigParam CHECKPOINTER_WAKEUP_INTERVAL =
889         new DurationConfigParam(EnvironmentConfig.CHECKPOINTER_WAKEUP_INTERVAL,
890                                 "1 s",                 // min
891                                 "75 min",              // max
892                                 "0",                   // default
893                                 false,                 // mutable
894                                 false);                // forReplication
895 
896     public static final IntConfigParam CHECKPOINTER_RETRY =
897         new IntConfigParam(EnvironmentConfig.CHECKPOINTER_DEADLOCK_RETRY,
898                            Integer.valueOf(0),                 // min
899                            Integer.valueOf(Integer.MAX_VALUE), // max
900                            Integer.valueOf(3),                 // default
901                            false,                          // mutable
902                            false);                         // forReplication
903 
904     public static final BooleanConfigParam CHECKPOINTER_HIGH_PRIORITY =
905         new BooleanConfigParam(EnvironmentConfig.CHECKPOINTER_HIGH_PRIORITY,
906                                false, // default
907                                true,  // mutable
908                                false);// forReplication
909 
910     /*
911      * Cleaner
912      */
913     public static final IntConfigParam CLEANER_MIN_UTILIZATION =
914         new IntConfigParam(EnvironmentConfig.CLEANER_MIN_UTILIZATION,
915                            Integer.valueOf(0),           // min
916                            Integer.valueOf(90),          // max
917                            Integer.valueOf(50),          // default
918                            true,                     // mutable
919                            false);                   // forReplication
920 
921     public static final IntConfigParam CLEANER_MIN_FILE_UTILIZATION =
922         new IntConfigParam(EnvironmentConfig.CLEANER_MIN_FILE_UTILIZATION,
923                            Integer.valueOf(0),           // min
924                            Integer.valueOf(50),          // max
925                            Integer.valueOf(5),           // default
926                            true,                     // mutable
927                            false);                   // forReplication
928 
929     public static final LongConfigParam CLEANER_BYTES_INTERVAL =
930         new LongConfigParam(EnvironmentConfig.CLEANER_BYTES_INTERVAL,
931                             Long.valueOf(0),              // min
932                             Long.valueOf(Long.MAX_VALUE), // max
933                             Long.valueOf(0),              // default
934                             true,                     // mutable
935                             false);                   // forReplication
936 
937     public static final BooleanConfigParam CLEANER_FETCH_OBSOLETE_SIZE =
938         new BooleanConfigParam(EnvironmentConfig.CLEANER_FETCH_OBSOLETE_SIZE,
939                                false, // default
940                                true,  // mutable
941                                false);// forReplication
942 
943     public static final BooleanConfigParam CLEANER_ADJUST_UTILIZATION =
944         new BooleanConfigParam(EnvironmentConfig.CLEANER_ADJUST_UTILIZATION,
945                                false, // default
946                                true,  // mutable
947                                false);// forReplication
948 
949     public static final IntConfigParam CLEANER_DEADLOCK_RETRY =
950         new IntConfigParam(EnvironmentConfig.CLEANER_DEADLOCK_RETRY,
951                            Integer.valueOf(0),                // min
952                            Integer.valueOf(Integer.MAX_VALUE),// max
953                            Integer.valueOf(3),                // default
954                            true,                          // mutable
955                            false);                        // forReplication
956 
957     public static final DurationConfigParam CLEANER_LOCK_TIMEOUT =
958         new DurationConfigParam(EnvironmentConfig.CLEANER_LOCK_TIMEOUT,
959                                 "0",                // min
960                                 "75 min",           // max
961                                 "500 ms",           // default
962                                 true,               // mutable
963                                 false);             // forReplication
964 
965     public static final BooleanConfigParam CLEANER_REMOVE =
966         new BooleanConfigParam(EnvironmentConfig.CLEANER_EXPUNGE,
967                                true,                 // default
968                                true,                 // mutable
969                                false);               // forReplication
970 
971     public static final BooleanConfigParam CLEANER_USE_DELETED_DIR =
972         new BooleanConfigParam(EnvironmentConfig.CLEANER_USE_DELETED_DIR,
973                                false,                // default
974                                true,                 // mutable
975                                false);               // forReplication
976 
977     /**
978      * @deprecated As of 1.7.1, no longer used.
979      */
980     public static final IntConfigParam CLEANER_MIN_FILES_TO_DELETE =
981         new IntConfigParam("je.cleaner.minFilesToDelete",
982                            Integer.valueOf(1),           // min
983                            Integer.valueOf(1000000),     // max
984                            Integer.valueOf(5),           // default
985                            false,                    // mutable
986                            false);        // forReplication
987 
988     /**
989      * @deprecated As of 2.0, no longer used.
990      */
991     public static final IntConfigParam CLEANER_RETRIES =
992         new IntConfigParam("je.cleaner.retries",
993                            Integer.valueOf(0),           // min
994                            Integer.valueOf(1000),        // max
995                            Integer.valueOf(10),          // default
996                            false,                    // mutable
997                            false);        // forReplication
998 
999     /**
1000      * @deprecated As of 2.0, no longer used.
1001      */
1002     public static final IntConfigParam CLEANER_RESTART_RETRIES =
1003         new IntConfigParam("je.cleaner.restartRetries",
1004                            Integer.valueOf(0),           // min
1005                            Integer.valueOf(1000),        // max
1006                            Integer.valueOf(5),           // default
1007                            false,                    // mutable
1008                            false);        // forReplication
1009 
1010     public static final IntConfigParam CLEANER_MIN_AGE =
1011         new IntConfigParam(EnvironmentConfig.CLEANER_MIN_AGE,
1012                            Integer.valueOf(1),           // min
1013                            Integer.valueOf(1000),        // max
1014                            Integer.valueOf(2),           // default
1015                            true,                     // mutable
1016                            false);                   // forReplication
1017 
1018     public static final IntConfigParam CLEANER_CALC_RECENT_LN_SIZES =
1019         new IntConfigParam("je.cleaner.calc.recentLNSizes",
1020                            Integer.valueOf(1),        // min
1021                            Integer.valueOf(100),      // max
1022                            Integer.valueOf(10),       // default
1023                            false,                     // mutable
1024                            false);                    // forReplication
1025 
1026     public static final IntConfigParam CLEANER_CALC_MIN_UNCOUNTED_LNS =
1027         new IntConfigParam("je.cleaner.calc.minUncountedLNs",
1028                            Integer.valueOf(0),        // min
1029                            Integer.valueOf(1000000),  // max
1030                            Integer.valueOf(1000),     // default
1031                            false,                     // mutable
1032                            false);                    // forReplication
1033 
1034     public static final IntConfigParam CLEANER_CALC_INITIAL_ADJUSTMENTS =
1035         new IntConfigParam("je.cleaner.calc.initialAdjustments",
1036                            Integer.valueOf(1),        // min
1037                            Integer.valueOf(100),      // max
1038                            Integer.valueOf(5),        // default
1039                            false,                     // mutable
1040                            false);                    // forReplication
1041 
1042     public static final IntConfigParam CLEANER_CALC_MIN_PROBE_SKIP_FILES =
1043         new IntConfigParam("je.cleaner.calc.minProbeSkipFiles",
1044                            Integer.valueOf(1),        // min
1045                            Integer.valueOf(100),      // max
1046                            Integer.valueOf(5),        // default
1047                            false,                     // mutable
1048                            false);                    // forReplication
1049 
1050     public static final IntConfigParam CLEANER_CALC_MAX_PROBE_SKIP_FILES =
1051         new IntConfigParam("je.cleaner.calc.maxProbeSkipFiles",
1052                            Integer.valueOf(1),        // min
1053                            Integer.valueOf(100),      // max
1054                            Integer.valueOf(20),       // default
1055                            false,                     // mutable
1056                            false);                    // forReplication
1057 
1058     /**
1059      * @deprecated
1060      * Retained here only to avoid errors in old je.properties files.
1061      */
1062     public static final BooleanConfigParam CLEANER_CLUSTER =
1063         new BooleanConfigParam("je.cleaner.cluster",
1064                                false,               // default
1065                                true,                // mutable
1066                                false);              // forReplication
1067 
1068     /**
1069      * @deprecated
1070      * Retained here only to avoid errors in old je.properties files.
1071      */
1072     public static final BooleanConfigParam CLEANER_CLUSTER_ALL =
1073         new BooleanConfigParam("je.cleaner.clusterAll",
1074                                false,              // default
1075                                true,               // mutable
1076                                false);             // forReplication
1077 
1078     public static final IntConfigParam CLEANER_MAX_BATCH_FILES =
1079         new IntConfigParam(EnvironmentConfig.CLEANER_MAX_BATCH_FILES,
1080                            Integer.valueOf(0),         // min
1081                            Integer.valueOf(100000),    // max
1082                            Integer.valueOf(0),         // default
1083                            true,                   // mutable
1084                            false);                 // forReplication
1085 
1086     public static final IntConfigParam CLEANER_READ_SIZE =
1087         new IntConfigParam(EnvironmentConfig.CLEANER_READ_SIZE,
1088                            Integer.valueOf(128),  // min
1089                            null,              // max
1090                            Integer.valueOf(0),    // default
1091                            true,              // mutable
1092                            false);            // forReplication
1093 
1094     /**
1095      * DiskOrderedScan
1096      */
1097     public static final DurationConfigParam DOS_PRODUCER_QUEUE_TIMEOUT =
1098         new DurationConfigParam(EnvironmentConfig.DOS_PRODUCER_QUEUE_TIMEOUT,
1099                                 "0",                // min
1100                                 "75 min",           // max
1101                                 "10 seconds",       // default
1102                                 true,               // mutable
1103                                 false);             // forReplication
1104 
1105     /**
1106      * Not part of public API.
1107      *
1108      * If true, the cleaner tracks and stores detailed information that is used
1109      * to decrease the cost of cleaning.
1110      */
1111     public static final BooleanConfigParam CLEANER_TRACK_DETAIL =
1112         new BooleanConfigParam("je.cleaner.trackDetail",
1113                                true,          // default
1114                                false,         // mutable
1115                                false);        // forReplication
1116 
1117     public static final IntConfigParam CLEANER_DETAIL_MAX_MEMORY_PERCENTAGE =
1118     new IntConfigParam(EnvironmentConfig.CLEANER_DETAIL_MAX_MEMORY_PERCENTAGE,
1119                            Integer.valueOf(1),    // min
1120                            Integer.valueOf(90),   // max
1121                            Integer.valueOf(2),    // default
1122                            true,              // mutable
1123                            false);            // forReplication
1124 
1125     /**
1126      * Not part of public API, since it applies to a very old bug.
1127      *
1128      * If true, detail information is discarded that was added by earlier
1129      * versions of JE (specifically 2.0.42 and 2.0.54) if it may be invalid.
1130      * This may be set to false for increased performance when those version of
1131      * JE were used but LockMode.RMW was never used.
1132      */
1133     public static final BooleanConfigParam CLEANER_RMW_FIX =
1134         new BooleanConfigParam("je.cleaner.rmwFix",
1135                                true,          // default
1136                                false,         // mutable
1137                                false);        // forReplication
1138 
1139     public static final ConfigParam CLEANER_FORCE_CLEAN_FILES =
1140         new ConfigParam(EnvironmentConfig.CLEANER_FORCE_CLEAN_FILES,
1141                         "",                  // default
1142                         false,               // mutable
1143                         false);              // forReplication
1144 
1145     public static final IntConfigParam CLEANER_UPGRADE_TO_LOG_VERSION =
1146         new IntConfigParam(EnvironmentConfig.CLEANER_UPGRADE_TO_LOG_VERSION,
1147                            Integer.valueOf(-1),  // min
1148                            null,             // max
1149                            Integer.valueOf(0),   // default
1150                            false,            // mutable
1151                            false);           // forReplication
1152 
1153     public static final IntConfigParam CLEANER_THREADS =
1154         new IntConfigParam(EnvironmentConfig.CLEANER_THREADS,
1155                            Integer.valueOf(1),   // min
1156                            null,             // max
1157                            Integer.valueOf(1),   // default
1158                            true,             // mutable
1159                            false);           // forReplication
1160 
1161     public static final IntConfigParam CLEANER_LOOK_AHEAD_CACHE_SIZE =
1162         new IntConfigParam(EnvironmentConfig.CLEANER_LOOK_AHEAD_CACHE_SIZE,
1163                            Integer.valueOf(0),    // min
1164                            null,              // max
1165                            Integer.valueOf(8192), // default
1166                            true,              // mutable
1167                            false);            // forReplication
1168 
1169     /**
1170      * @deprecated
1171      * Retained here only to avoid errors in old je.properties files.
1172      */
1173     public static final BooleanConfigParam
1174         CLEANER_FOREGROUND_PROACTIVE_MIGRATION = new BooleanConfigParam
1175             (EnvironmentConfig.CLEANER_FOREGROUND_PROACTIVE_MIGRATION,
1176                            false,                // default
1177                            true,                 // mutable
1178                            false);               // forReplication
1179 
1180     /**
1181      * @deprecated
1182      * Retained here only to avoid errors in old je.properties files.
1183      */
1184     public static final BooleanConfigParam
1185         CLEANER_BACKGROUND_PROACTIVE_MIGRATION = new BooleanConfigParam
1186             (EnvironmentConfig.CLEANER_BACKGROUND_PROACTIVE_MIGRATION,
1187                            false,                // default
1188                            true,                 // mutable
1189                            false);               // forReplication
1190 
1191     /**
1192      * @deprecated
1193      * Retained here only to avoid errors in old je.properties files.
1194      */
1195     public static final BooleanConfigParam CLEANER_LAZY_MIGRATION =
1196         new BooleanConfigParam(EnvironmentConfig.CLEANER_LAZY_MIGRATION,
1197                            false,             // default
1198                            true,              // mutable
1199                            false);            // forReplication
1200 
1201     /* Processed entry count after which we clear the database cache. */
1202     public static final IntConfigParam ENV_DB_CACHE_CLEAR_COUNT =
1203         new IntConfigParam("je.env.dbCacheClearCount",
1204                            Integer.valueOf(1),    // min
1205                            null,                  // max
1206                            Integer.valueOf(100),  // default
1207                            true,                  // mutable
1208                            false);                // forReplication
1209 
1210     /*
1211      * Transactions
1212      */
1213     public static final IntConfigParam N_LOCK_TABLES =
1214         new IntConfigParam(EnvironmentConfig.LOCK_N_LOCK_TABLES,
1215                            Integer.valueOf(1),    // min
1216                            Integer.valueOf(32767),// max
1217                            Integer.valueOf(1),    // default
1218                            false,             // mutable
1219                            false);            // forReplication
1220 
1221     public static final DurationConfigParam LOCK_TIMEOUT =
1222         new DurationConfigParam(EnvironmentConfig.LOCK_TIMEOUT,
1223                                 null,              // min
1224                                 "75 min",          // max
1225                                 "500 ms",          // default
1226                                 false,             // mutable
1227                                 false);            // forReplication
1228 
1229     public static final BooleanConfigParam LOCK_OLD_LOCK_EXCEPTIONS =
1230         new BooleanConfigParam(EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS,
1231                                false,              // default
1232                                false,              // mutable
1233                                false);             // forReplication
1234 
1235     public static final DurationConfigParam TXN_TIMEOUT =
1236         new DurationConfigParam(EnvironmentConfig.TXN_TIMEOUT,
1237                                 null,              // min
1238                                 "75 min",          // max
1239                                 "0",               // default
1240                                 false,             // mutable
1241                                 false);            // forReplication
1242 
1243     public static final BooleanConfigParam TXN_SERIALIZABLE_ISOLATION =
1244         new BooleanConfigParam(EnvironmentConfig.TXN_SERIALIZABLE_ISOLATION,
1245                                false,              // default
1246                                false,              // mutable
1247                                false);             // forReplication
1248 
1249     public static final BooleanConfigParam TXN_DEADLOCK_STACK_TRACE =
1250         new BooleanConfigParam(EnvironmentConfig.TXN_DEADLOCK_STACK_TRACE,
1251                                false,              // default
1252                                true,               // mutable
1253                                false);             // forReplication
1254 
1255     public static final BooleanConfigParam TXN_DUMPLOCKS =
1256         new BooleanConfigParam(EnvironmentConfig.TXN_DUMP_LOCKS,
1257                                false,              // default
1258                                true,               // mutable
1259                                false);             // forReplication
1260 
1261     /*
1262      * If true, exceptions and critical cleaner and recovery event tracing
1263      * is written into the .jdb files.
1264      */
1265     public static final BooleanConfigParam JE_LOGGING_DBLOG =
1266         new BooleanConfigParam("je.env.logTrace",
1267                                true,               // default
1268                                false,              // mutable
1269                                false);             // forReplication
1270 
1271     /*
1272      * The level for JE ConsoleHandler.
1273      */
1274     public static final ConfigParam JE_CONSOLE_LEVEL =
1275         new ConfigParam(EnvironmentConfig.CONSOLE_LOGGING_LEVEL,
1276                         "OFF",                     // default
1277                         true,                      // mutable
1278                         false) {                   // for Replication
1279 
1280             @Override
1281             public void validateValue(String level)
1282                 throws NullPointerException, IllegalArgumentException {
1283 
1284                 /* Parse the level. */
1285                 Level.parse(level);
1286             }
1287     };
1288 
1289     /*
1290      * The level for JE FileHandler.
1291      */
1292     public static final ConfigParam JE_FILE_LEVEL =
1293         new ConfigParam(EnvironmentConfig.FILE_LOGGING_LEVEL,
1294                         "INFO",                    // default
1295                         true,                      // mutable
1296                         false) {                   // for Replication
1297 
1298             @Override
1299             public void validateValue(String level)
1300                 throws NullPointerException, IllegalArgumentException {
1301 
1302                 /* Parse the level. */
1303                 Level.parse(level);
1304             }
1305     };
1306 
1307     /*
1308      * The default below for JE_DURABILITY is currently null to avoid mixed
1309      * mode durability API exceptions. Once the "sync" API has been removed, we
1310      * can provide a default like: sync,sync,simple majority that's compatible
1311      * with the current sync default stand alone behavior and is safe, though
1312      * not the best performing setup, wrt HA.
1313      */
1314     public static final ConfigParam JE_DURABILITY =
1315         new ConfigParam(EnvironmentConfig.TXN_DURABILITY,
1316                         null,                  // default
1317                         true,                  // mutable
1318                         false) {               // forReplication
1319 
1320         @Override
1321         public void validateValue(String durabilityString)
1322             throws IllegalArgumentException {
1323             // Parse the string to determine whether it's valid
1324             Durability.parse(durabilityString);
1325         }
1326     };
1327 
1328     /**
1329      * If environment startup exceeds this duration, startup statistics are
1330      * logged and can be found in the je.info file.
1331      */
1332     public static final DurationConfigParam STARTUP_DUMP_THRESHOLD =
1333         new DurationConfigParam(EnvironmentConfig.STARTUP_DUMP_THRESHOLD,
1334                                 "0",               // min
1335                                 null,              // max
1336                                 "5 min",           // default
1337                                 false,             // mutable
1338                                 false);            // forReplication
1339     public static final BooleanConfigParam STATS_COLLECT =
1340             new BooleanConfigParam(EnvironmentConfig.STATS_COLLECT,
1341                     true,         // default
1342                     true,         // mutable
1343                     false);        // forReplication
1344 
1345     public static final IntConfigParam STATS_FILE_ROW_COUNT =
1346             new IntConfigParam(EnvironmentConfig.STATS_FILE_ROW_COUNT,
1347                                Integer.valueOf(2),  // min
1348                                Integer.MAX_VALUE, // max
1349                                Integer.valueOf(1440), // default
1350                                true,                // mutable
1351                                false);              // forReplication
1352 
1353     public static final IntConfigParam STATS_MAX_FILES =
1354             new IntConfigParam(EnvironmentConfig.STATS_MAX_FILES,
1355                                Integer.valueOf(1),  // min
1356                                Integer.MAX_VALUE, // max
1357                                Integer.valueOf(10), // default
1358                                true,                // mutable
1359                                false);              // forReplication
1360 
1361     public static final DurationConfigParam STATS_COLLECT_INTERVAL =
1362             new DurationConfigParam(EnvironmentConfig.STATS_COLLECT_INTERVAL,
1363                                     "1 s",           // min
1364                                     null,            // max
1365                                     "1 min",           // default
1366                                     true,            // mutable
1367                                     false);          // forReplication
1368 
1369     public static final ConfigParam STATS_FILE_DIRECTORY =
1370             new ConfigParam(EnvironmentConfig.STATS_FILE_DIRECTORY,
1371                             "",                  // default
1372                             false,               // mutable
1373                             false);              // forReplication
1374 
1375     /*
1376      * Replication params are in com.sleepycat.je.rep.impl.RepParams
1377      */
1378 
1379     /*
1380      * Add a configuration parameter to the set supported by an environment.
1381      */
addSupportedParam(ConfigParam param)1382     public static void addSupportedParam(ConfigParam param) {
1383         SUPPORTED_PARAMS.put(param.getName(), param);
1384     }
1385 }
1386