1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.jencks.factory;
18
19 /***
20 * This abstract class defines common properties for every
21 * kind of pool used by the connection manager of Geronimo.
22 * <p/>
23 * These properties are the following:
24 * - maxSize: the max size of the pool
25 * - minSize: the min size of the pool
26 * - blockingTimeoutMilliseconds: the blocking timeout of the pool
27 * in milliseconds
28 * - idleTimeoutMinutes: the idle timeout of the pool in minutes
29 * - matchOne:
30 * - matchAll:
31 * selectOneAssumeMatch:
32 *
33 * @author Thierry Templier
34 * @see PartitionedPoolFactoryBean
35 * @see SinglePoolFactoryBean
36 */
37 public abstract class AbstractGeronimoPool {
38
39 protected int maxSize;
40 protected int minSize;
41 protected int blockingTimeoutMilliseconds;
42 protected int idleTimeoutMinutes;
43 protected boolean matchOne;
44 protected boolean matchAll;
45 protected boolean selectOneAssumeMatch;
46
47 public int getBlockingTimeoutMilliseconds() {
48 return blockingTimeoutMilliseconds;
49 }
50
51 public int getIdleTimeoutMinutes() {
52 return idleTimeoutMinutes;
53 }
54
55 public boolean isMatchAll() {
56 return matchAll;
57 }
58
59 public boolean isMatchOne() {
60 return matchOne;
61 }
62
63 public int getMaxSize() {
64 return maxSize;
65 }
66
67 public int getMinSize() {
68 return minSize;
69 }
70
71 public boolean isSelectOneAssumeMatch() {
72 return selectOneAssumeMatch;
73 }
74
75 /***
76 * Set the blocking timeout property in milliseconds.
77 */
78 public void setBlockingTimeoutMilliseconds(int blockingTimeoutMilliseconds) {
79 this.blockingTimeoutMilliseconds = blockingTimeoutMilliseconds;
80 }
81
82 /***
83 * Set the idle timeout property in minutes.
84 */
85 public void setIdleTimeoutMinutes(int idleTimeoutMinutes) {
86 this.idleTimeoutMinutes = idleTimeoutMinutes;
87 }
88
89 /***
90 * Set the match all property.
91 */
92 public void setMatchAll(boolean matchAll) {
93 this.matchAll = matchAll;
94 }
95
96 /***
97 * Set the match one property.
98 */
99 public void setMatchOne(boolean matchOne) {
100 this.matchOne = matchOne;
101 }
102
103 /***
104 * Set the max size property of the pool.
105 */
106 public void setMaxSize(int maxSize) {
107 this.maxSize = maxSize;
108 }
109
110 /***
111 * Set the min size property of the pool.
112 */
113 public void setMinSize(int minSize) {
114 this.minSize = minSize;
115 }
116
117 /***
118 * Set the select one assume mathc property.
119 */
120 public void setSelectOneAssumeMatch(boolean selectOneAssumeMatch) {
121 this.selectOneAssumeMatch = selectOneAssumeMatch;
122 }
123
124 }