01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdbc.logging;
12:
13: import java.sql.Connection;
14:
15: /**
16: * Event logged for PreparedStatement pool operations.
17: */
18: public class JdbcPsPoolEvent extends JdbcConnectionEvent {
19:
20: private int numActive;
21: private int numIdle;
22: private int statementID;
23:
24: public JdbcPsPoolEvent(long txId, Connection con, String descr,
25: int type, int numActive, int numIdle) {
26: super (txId, con, descr, type);
27: this .numActive = numActive;
28: this .numIdle = numIdle;
29: }
30:
31: public int getNumActive() {
32: return numActive;
33: }
34:
35: public int getNumIdle() {
36: return numIdle;
37: }
38:
39: public int getStatementID() {
40: return statementID;
41: }
42:
43: public void setStatementID(int statementID) {
44: this .statementID = statementID;
45: }
46:
47: public String getDescription() {
48: return numActive + "/" + numIdle + " " + super .getDescription();
49: }
50:
51: public int getResourceID() {
52: return statementID;
53: }
54:
55: }
|