KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > uk > org > primrose > pool > jmx > QueueMBean


1 /**
2 * Library name : Primrose - A Java Database Connection Pool.
3 * Published by Ben Keeping, http://primrose.org.uk .
4 * Copyright (C) 2004 Ben Keeping, primrose.org.uk
5 * Email: Use "Contact Us Form" on website
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */

21
22 package uk.org.primrose.pool.jmx;
23 import uk.org.primrose.pool.core.*;
24
25 public interface QueueMBean {
26
27     /** Operations **/
28     public String JavaDoc killActiveConnectionsOverAge(int age);
29     public void startPool();
30     public void stopPool();
31     public void reset();
32     public void addConnection(int num);
33
34     /** WO Attributes **/
35
36     /**
37     * Sets whether the connections should have auto commit on or off by default.
38     */

39     public void setConnectionAutoCommit(boolean connectionAutoCommit);
40
41
42     /**
43     * Sets whether the connections are pooled, or not (useful for odd situations/debugging).
44     */

45     public void setRunPooledMode(boolean runPooledMode);
46
47     /**
48     * Sets whether the pool queues Connection Requests.
49     */

50     public void setQueueConnectionRequests(boolean queueConnectionRequests);
51
52     /**
53     * Sets whether the pool logs pool actions/messages.
54     */

55     public void setMessageLogging(boolean messageLogging);
56
57     /**
58     * Sets whether the pool logs the size of the pool.
59     */

60     public void setSizeLogging(boolean sizeLogging);
61
62     /**
63     * Sets the pool idle time.
64     */

65     public void setIdleTime(int idleTime);
66
67     /**
68     * Sets whether the pool should kill connections in use (active) over a certain age (in milliseconds).
69     */

70     public void setKillActiveConnectionsOverAge(String JavaDoc killActiveConnectionsOverAge);
71
72     /**
73     * Sets how often the pool should cycle connections.
74     * The param is the number of SQL transactions performed.
75     * If -1, then connections are not cycled.
76     */

77     public void setCycleConnections(int cycleConnections);
78
79     /** RO Attributes **/
80
81
82
83     /**
84     * Gets the default level for connection's isolation transaction level.
85     */

86     public String JavaDoc getConnectionTransactionIsolation();
87
88     /**
89     * Gets whether the connections should have auto commit on or off by default.
90     */

91     public boolean getConnectionAutoCommit();
92
93
94     /**
95     * Gets whether the connections are pooled, or not (useful for odd situations/debugging).
96     */

97     public boolean getRunPooledMode();
98
99     /**
100     * Gets whether the pool queues Connection Requests.
101     */

102     public boolean getQueueConnectionRequests();
103
104     /**
105     * Gets how often the pool should cycle connections.
106     * The param is the number of SQL transactions performed.
107     * If -1, then connections are not cycled.
108     */

109     public int getCycleConnections();
110
111     /**
112     * Gets the pool idle time.
113     */

114     public int getIdleTime();
115
116     /**
117     * Gets whether the pool should kill connections in use (active) over a certain age (in milliseconds).
118     */

119     public String JavaDoc getKillActiveConnectionsOverAge();
120
121     /**
122     * Returns the logging state.
123     * @return boolean
124     */

125     public boolean getMessageLogging();
126
127     /**
128     * Returns the sizeLogging state.
129     * @return boolean
130     */

131     public boolean getSizeLogging();
132
133     /**
134     * Returns the SQL (if any) associated with a connection.
135     * @return String[]
136     */

137     public String JavaDoc[] getActiveConnectionData();
138
139     /**
140     * Returns the threads waiting for a connection.
141     * @return int
142     */

143     public int getWaitingThreads();
144
145     /**
146     * Returns whether the pool is available.
147     * @return boolean
148     */

149     public boolean getAvailable();
150
151     /**
152     * Sets whether the pool is available.
153     * @return boolean
154     */

155     public void setAvailable(boolean a);
156
157     /**
158     * Returns the active connections size.
159     * @return boolean
160     */

161     public int getActiveConnectionsSize();
162
163     /**
164     * Returns the available connections size.
165     * @return boolean
166     */

167     public int getAvailableConnectionsSize();
168
169     /**
170     * Returns the availableConnections.
171     * @return String[]
172     */

173     public String JavaDoc[] getAvailableConnections();
174
175     /**
176     * Returns the base.
177     * @return int
178     */

179     public int getBase();
180
181     /**
182     * Returns the user.
183     * @return String
184     */

185     public String JavaDoc getUser();
186
187     /**
188     * Returns the password.
189     * @return String
190     */

191     //public String getPassword();
192

193     /**
194     * Returns the driverClass.
195     * @return String
196     */

197     public String JavaDoc getDriverClass();
198
199     /**
200     * Returns the driverURL.
201     * @return String
202     */

203     public String JavaDoc getDriverURL();
204
205
206     /**
207     * Returns the name.
208     * @return String
209     */

210     public String JavaDoc getName();
211
212     /**
213     * Returns the overflow.
214     * @return int
215     */

216     public int getOverflow();
217
218     /**
219     * Returns the password.
220     * @return String
221     */

222 }
Popular Tags