KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > minerva > pool > PoolParameters


1 /*
2  * Licensed under the X license (see http://www.x.org/terms.htm)
3  */

4 package org.ofbiz.minerva.pool;
5
6 import java.io.PrintWriter JavaDoc;
7 import java.io.Serializable JavaDoc;
8
9 /**
10  * Convenience wrapper for all ObjectPool parameters. See the
11  * ObjectPool setters and getters for descriptions of the parameters.
12  * @see org.ofbiz.minerva.pool.ObjectPool
13  *
14  * @author Aaron Mulder ammulder@alumni.princeton.edu
15  */

16 public class PoolParameters implements Serializable JavaDoc {
17
18     public final static String JavaDoc MIN_SIZE_KEY = "MinSize";
19     public final static String JavaDoc MAX_SIZE_KEY = "MaxSize";
20     public final static String JavaDoc BLOCKING_KEY = "Blocking";
21     public final static String JavaDoc BLOCKING_TIMEOUT_KEY = "BlockingTimeout";
22     public final static String JavaDoc GC_ENABLED_KEY = "GCEnabled";
23     public final static String JavaDoc IDLE_TIMEOUT_ENABLED_KEY = "IdleTimeoutEnabled";
24     public final static String JavaDoc INVALIDATE_ON_ERROR_KEY = "InvalidateOnError";
25     public final static String JavaDoc TRACK_LAST_USED_KEY = "TimestampUsed";
26     public final static String JavaDoc GC_INTERVAL_MS_KEY = "GCIntervalMillis";
27     public final static String JavaDoc GC_MIN_IDLE_MS_KEY = "GCMinIdleMillis";
28     public final static String JavaDoc IDLE_TIMEOUT_MS_KEY = "IdleTimeoutMillis";
29     public final static String JavaDoc MAX_IDLE_TIMEOUT_PERCENT_KEY = "MaxIdleTimeoutPercent";
30     public final static String JavaDoc LOGGER_ENABLED = "LoggingEnabled";
31
32
33     public int minSize = 0;
34     public int maxSize = 0;
35     public boolean blocking = true;
36     public int blockingTimeoutSecs = -1;//Forever...
37
public boolean gcEnabled = false;
38     public boolean idleTimeoutEnabled = false;
39     public boolean invalidateOnError = false;
40     public boolean trackLastUsed = false;
41     public long gcIntervalMillis = 120000l;
42     public long gcMinIdleMillis = 1200000l;
43     public long idleTimeoutMillis = 1800000l;
44     public float maxIdleTimeoutPercent = 1.0f;
45     public PrintWriter JavaDoc logger = null;
46
47     public PoolParameters() {
48     }
49 }
50
51 /*
52 vim:tabstop=3:et:shiftwidth=3
53 */

54
Popular Tags