001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: PoolAttributes.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.api.pool;
025:
026: /**
027: * Defines the interface used to collect/set information on this pool.
028: * @author Florent Benoit
029: */
030: public interface PoolAttributes {
031: //
032: // /**
033: // * <b>getMaxAge</b> gets the max age for a pool entry.
034: // * @return int max number of minutes to keep a connection in the pool.
035: // */
036: // int getMaxAge();
037: //
038: // /**
039: // * <b>getMaxOpentime</b> gets the max age for a pool entry.
040: // * @return int max number of minutes to keep a connection in the pool.
041: // */
042: // int getMaxOpentime();
043: //
044: // /**
045: // * <b>getMaxSize</b> retrieves the maximum size assigned to this Pool.
046: // * @return The maximum size currently assigned to this Pool.
047: // */
048: // int getMaxSize();
049: //
050: // /**
051: // * <b>getMaxWaiters</b> gets the maximum number of waiters for a connection
052: // * in this Pool.
053: // * @return int maximum number of waiters
054: // */
055: // int getMaxWaiters();
056: //
057: // /**
058: // * <b>getMaxWaitTime</b> gets the maximum number of seconds to wait for a
059: // * connection in this Pool.
060: // * @return int maximum number of seconds to wait
061: // */
062: // int getMaxWaitTime();
063: //
064: // /**
065: // * <b>getMinSize</b> retrieves the minimum size assigned to this Pool.
066: // * @return The minimum size currently assigned to this Pool.
067: // */
068: // int getMinSize();
069: //
070: // /**
071: // * <b>getSamplingPeriod</b> gets the number of seconds between statistics
072: // * sampling for this Pool.
073: // * @return int number of seconds between samplings
074: // */
075: // int getSamplingPeriod();
076: //
077: // /**
078: // * <b>getTimeout</b> retrieves the timeout assigned to this Pool.
079: // * @return The timeout currently assigned to this Pool.
080: // */
081: // long getTimeout();
082: //
083: // /**
084: // * <b>getSize</b> retrieves the current size of this Pool.
085: // * @return The current size of this Pool.
086: // */
087: // int getSize();
088: //
089: // /**
090: // * @return init The pool init size.
091: // */
092: // int getInitSize();
093: //
094: // /**
095: // * <b>setInitSize</b> creates initsize resoures to this Pool.
096: // * @param initsize The init size to be created.
097: // * @throws Exception if an error occurs
098: // */
099: // void setInitSize(int initsize) throws Exception;
100: //
101: // /**
102: // * <b>setMaxAge</b> sets the max age for a pool entry.
103: // * @param maxAge int max number of minutes to keep a connection in the pool.
104: // */
105: // void setMaxAge(int maxAge);
106: //
107: // /**
108: // * <b>setMaxOpentime</b> sets the max age for an entry to be opened.
109: // * @param maxOpentime int max number of minutes to keep a connection opened.
110: // */
111: // void setMaxOpentime(int maxOpentime);
112: //
113: // /**
114: // * <b>setMaxSize</b> assigns a maximum size to this Pool.
115: // * @param maxsize int maximum size to be assigned.
116: // * @throws Exception if an error occurs
117: // */
118: // void setMaxSize(int maxsize) throws Exception;
119: //
120: // /**
121: // * <b>setMaxWaiters</b> sets the maximum number of waiters for a connection
122: // * in this Pool.
123: // * @param maxWaiters int maximum number of waiters
124: // */
125: // void setMaxWaiters(int maxWaiters);
126: //
127: // /**
128: // * <b>setMaxWaitTime</b> sets the maximum number of seconds to wait for a
129: // * connection in this Pool.
130: // * @param maxWaitTime int maximum number of seconds to wait
131: // */
132: // void setMaxWaitTime(int maxWaitTime);
133: //
134: // /**
135: // * <b>setMinSize</b> assigns a minimum size to this Pool.
136: // * @param minsize int minimum size to be assigned.
137: // * @throws Exception if an error occurs
138: // */
139: // void setMinSize(int minsize) throws Exception;
140: //
141: // /**
142: // * <b>setSamplingPeriod</b> sets the number of seconds between statistics
143: // * sampling for this Pool.
144: // * @param samplingPeriod int number of seconds between samplings
145: // */
146: // void setSamplingPeriod(int samplingPeriod);
147: //
148: // /**
149: // * <b>setTimeout</b> assigns a timeout to this Pool.
150: // * @param crto long timeout to be assigned.
151: // */
152: // void setTimeout(long crto);
153: //
154: //
155: // /**
156: // * @return int number of busy connections
157: // */
158: // int getCurrentBusy();
159: //
160: // /**
161: // * @return int number of opened connections
162: // */
163: // int getCurrentOpened();
164: //
165: // /**
166: // * @return maximum nb of busy connections in last sampling period
167: // */
168: // int getBusyMaxRecent();
169: //
170: // /**
171: // * @return minimum nb of busy connections in last sampling period
172: // */
173: // int getBusyMinRecent();
174: //
175: // /**
176: // * @return current number of connection waiters
177: // */
178: // int getCurrentWaiters();
179: //
180: // /**
181: // * @return int number of physical jdbc connection opened
182: // */
183: // int getOpenedCount();
184: //
185: // /**
186: // * @return int number of connection failures on open
187: // */
188: // int getConnectionFailures();
189: //
190: // /**
191: // * @return int number of connection leaks
192: // */
193: // int getConnectionLeaks();
194: //
195: // /**
196: // * @return int number of connection served
197: // */
198: // int getServedOpen();
199: //
200: // /**
201: // * @return int number of open calls that were rejected due to waiter
202: // * overflow
203: // */
204: // int getRejectedFull();
205: //
206: // /**
207: // * @return int number of open calls that were rejected by timeout
208: // */
209: // int getRejectedTimeout();
210: //
211: // /**
212: // * @return int number of open calls that were rejected
213: // */
214: // int getRejectedOther();
215: //
216: // /**
217: // * @return int number of open calls that were rejected
218: // */
219: // int getRejectedOpen();
220: //
221: // /**
222: // * @return maximum nb of waiters since the datasource creation
223: // */
224: // int getWaitersHigh();
225: //
226: // /**
227: // * @return maximum nb of waiters in last sampling period
228: // */
229: // int getWaitersHighRecent();
230: //
231: // /**
232: // * @return total nb of waiters since the datasource creation
233: // */
234: // int getWaiterCount();
235: //
236: // /**
237: // * @return total waiting time since the datasource creation
238: // */
239: // long getWaitingTime();
240: //
241: // /**
242: // * @return max waiting time since the datasource creation
243: // */
244: // long getWaitingHigh();
245: //
246: // /**
247: // * @return max waiting time in last sampling period
248: // */
249: // long getWaitingHighRecent();
250: //
251: }
|