01: /*
02: * @(#) ConnectionLeakEvent.java 1.0 02/08/01
03: */
04:
05: package org.smartlib.pool.core;
06:
07: /**
08: * This method defines the behavior of the class encapsulting a connection
09: * leak event. When ever a connection is blocked by the consumer for more than
10: * a then the specified time, a connection leak is said to have occurred.
11: * Information regarding this leak is encapsulated by an object whose behavior
12: * is defined by this interface.
13: *
14: * @author Sachin Shekar Shetty
15: * @version 1.0, 02/08/01
16: */
17:
18: import java.sql.*;
19:
20: public interface ConnectionLeakEvent {
21:
22: /**
23: * @return Connection which has been blocked by the consumer for more
24: * than the specified time.
25: */
26: public Connection getConnection();
27:
28: /**
29: * @return The owner of the connection.
30: */
31: public String getOwner();
32:
33: /**
34: * @return Timestamp when the connection was accessed last time.
35: */
36: public long getLastAccessedTime();
37:
38: /**
39: * @return Timestamp when connection was drawn from the pool.
40: */
41: public long getConnectionObtainedTime();
42:
43: /**
44: * @return Name of the pool.
45: */
46: public String getPoolName();
47:
48: }
|