KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > logging > JdbcPsPoolEvent


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.logging;
13
14 import java.sql.Connection JavaDoc;
15
16 /**
17  * Event logged for PreparedStatement pool operations.
18  */

19 public class JdbcPsPoolEvent extends JdbcConnectionEvent {
20
21     private int numActive;
22     private int numIdle;
23     private int statementID;
24
25     public JdbcPsPoolEvent(long txId, Connection JavaDoc con, String JavaDoc descr, int type,
26             int numActive, int numIdle) {
27         super(txId, con, descr, type);
28         this.numActive = numActive;
29         this.numIdle = numIdle;
30     }
31
32     public int getNumActive() {
33         return numActive;
34     }
35
36     public int getNumIdle() {
37         return numIdle;
38     }
39
40     public int getStatementID() {
41         return statementID;
42     }
43
44     public void setStatementID(int statementID) {
45         this.statementID = statementID;
46     }
47
48     public String JavaDoc getDescription() {
49         return numActive + "/" + numIdle + " " + super.getDescription();
50     }
51
52     public int getResourceID() {
53         return statementID;
54     }
55
56 }
57
Popular Tags