KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mchange > v2 > c3p0 > management > PooledDataSourceManager


1 /*
2  * Distributed as part of c3p0 v.0.9.1
3  *
4  * Copyright (C) 2005 Machinery For Change, Inc.
5  *
6  * Author: Steve Waldman <swaldman@mchange.com>
7  *
8  * This library is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License version 2.1, as
10  * published by the Free Software Foundation.
11  *
12  * This software 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
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this software; see the file LICENSE. If not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */

22
23
24 package com.mchange.v2.c3p0.management;
25
26 import java.sql.SQLException JavaDoc;
27 import java.util.Collection JavaDoc;
28 import com.mchange.v2.c3p0.PooledDataSource;
29
30 public class PooledDataSourceManager implements PooledDataSourceManagerMBean
31 {
32     PooledDataSource pds;
33
34     public PooledDataSourceManager( PooledDataSource pds )
35     { this.pds = pds; }
36
37     public String JavaDoc getIdentityToken()
38     { return pds.getIdentityToken(); }
39
40     public String JavaDoc getDataSourceName()
41     { return pds.getDataSourceName(); }
42
43     public void setDataSourceName(String JavaDoc dataSourceName)
44     { pds.setDataSourceName( dataSourceName ); }
45
46     public int getNumConnectionsDefaultUser() throws SQLException JavaDoc
47     { return pds.getNumConnectionsDefaultUser(); }
48
49     public int getNumIdleConnectionsDefaultUser() throws SQLException JavaDoc
50     { return pds.getNumIdleConnectionsDefaultUser(); }
51
52     public int getNumBusyConnectionsDefaultUser() throws SQLException JavaDoc
53     { return pds.getNumBusyConnectionsDefaultUser(); }
54
55     public int getNumUnclosedOrphanedConnectionsDefaultUser() throws SQLException JavaDoc
56     { return pds.getNumUnclosedOrphanedConnectionsDefaultUser(); }
57
58     public float getEffectivePropertyCycleDefaultUser() throws SQLException JavaDoc
59     { return pds.getEffectivePropertyCycleDefaultUser(); }
60
61     public int getThreadPoolSize() throws SQLException JavaDoc
62     { return pds.getThreadPoolSize(); }
63
64     public int getThreadPoolNumActiveThreads() throws SQLException JavaDoc
65     { return pds.getThreadPoolNumActiveThreads(); }
66
67     public int getThreadPoolNumIdleThreads() throws SQLException JavaDoc
68     { return pds.getThreadPoolNumIdleThreads(); }
69
70     public int getThreadPoolNumTasksPending() throws SQLException JavaDoc
71     { return pds.getThreadPoolNumTasksPending(); }
72
73     public String JavaDoc sampleThreadPoolStackTraces() throws SQLException JavaDoc
74     { return pds.sampleThreadPoolStackTraces(); }
75
76     public String JavaDoc sampleThreadPoolStatus() throws SQLException JavaDoc
77     { return pds.sampleThreadPoolStatus(); }
78
79     public void softResetDefaultUser() throws SQLException JavaDoc
80     { pds.softResetDefaultUser(); }
81
82     public int getNumConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc
83     { return pds.getNumConnections( username, password ); }
84
85     public int getNumIdleConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc
86     { return pds.getNumIdleConnections( username, password ); }
87
88     public int getNumBusyConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc
89     { return pds.getNumBusyConnections( username, password ); }
90
91     public int getNumUnclosedOrphanedConnections(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc
92     { return pds.getNumUnclosedOrphanedConnections( username, password ); }
93
94     public float getEffectivePropertyCycle(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc
95     { return pds.getEffectivePropertyCycle( username, password ); }
96
97     public void softReset(String JavaDoc username, String JavaDoc password) throws SQLException JavaDoc
98     { pds.softReset( username, password ); }
99
100     public int getNumBusyConnectionsAllUsers() throws SQLException JavaDoc
101     { return pds.getNumBusyConnectionsAllUsers(); }
102
103     public int getNumIdleConnectionsAllUsers() throws SQLException JavaDoc
104     { return pds.getNumIdleConnectionsAllUsers(); }
105
106     public int getNumConnectionsAllUsers() throws SQLException JavaDoc
107     { return pds.getNumConnectionsAllUsers(); }
108
109     public int getNumUnclosedOrphanedConnectionsAllUsers() throws SQLException JavaDoc
110     { return pds.getNumUnclosedOrphanedConnectionsAllUsers(); }
111
112     public void softResetAllUsers() throws SQLException JavaDoc
113     { pds.softResetAllUsers(); }
114
115     public int getNumUserPools() throws SQLException JavaDoc
116     { return pds.getNumUserPools(); }
117
118     public Collection JavaDoc getAllUsers() throws SQLException JavaDoc
119     { return pds.getAllUsers(); }
120
121     public void hardReset() throws SQLException JavaDoc
122     { pds.hardReset(); }
123
124     public void close() throws SQLException JavaDoc
125     { pds.close(); }
126 }
127
Popular Tags