Package org.logicalcobwebs.proxool
Interface ConnectionInfoIF
-
- All Superinterfaces:
java.lang.Comparable
- All Known Subinterfaces:
ProxyConnectionIF
- All Known Implementing Classes:
ProxyConnection
public interface ConnectionInfoIF extends java.lang.Comparable
Provides information about an individual connection. You can get a collection of these fromProxoolFacade
. You get back information about all the connections in a particular pool.String alias = "myPool"; Iterator i = ProxoolFacade.getConnectionInfos(alias).iterator(); while (i.hasNext()) { ConnectionInfoIF c = (ConnectionInfoIF)i.next(); ... }
- Version:
- $Revision: 1.12 $, $Date: 2005/10/07 08:18:23 $
- Author:
- billhorsman, $Author: billhorsman $ (current maintainer)
-
-
Field Summary
Fields Modifier and Type Field Description static int
MARK_FOR_EXPIRY
The next time this connection is made available we should expire it.static int
MARK_FOR_USE
Default - treat as normalstatic int
STATUS_ACTIVE
The connection is in usestatic int
STATUS_AVAILABLE
The connection is available for usestatic int
STATUS_NULL
This is the start and end state of every connectionstatic int
STATUS_OFFLINE
The connection is in use by the house keeping thread
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getAge()
The age in millseconds since this connection was builtjava.util.Date
getBirthDate()
LikegetBirthTime()
but in Date formatlong
getBirthTime()
The time that this connection was created.java.lang.String
getDelegateHashcode()
The hashcode (in hex) of the delegate connection object.java.lang.String
getDelegateUrl()
The URL that this connection is using (the definition might have changed since this connection was built).long
getId()
A unique ID for this connectionint
getMark()
Sometimes we want do something to a connection but can't because it is still active and we don't want to disrupt its use.java.lang.String
getProxyHashcode()
The hashcode (in hex) of the ProxyConnection object.java.lang.String
getRequester()
The name of the thread that asked for this connection.java.lang.String[]
getSqlCalls()
A log of the last SQL used on this connection.int
getStatus()
The status of the connection.long
getTimeLastStartActive()
When this connection was last given out.long
getTimeLastStopActive()
When this connection was last given back (or zero if it is still active).
-
-
-
Field Detail
-
MARK_FOR_USE
static final int MARK_FOR_USE
Default - treat as normal- See Also:
getMark()
, Constant Field Values
-
MARK_FOR_EXPIRY
static final int MARK_FOR_EXPIRY
The next time this connection is made available we should expire it.- See Also:
getMark()
, Constant Field Values
-
STATUS_NULL
static final int STATUS_NULL
This is the start and end state of every connection- See Also:
getStatus()
, Constant Field Values
-
STATUS_AVAILABLE
static final int STATUS_AVAILABLE
The connection is available for use- See Also:
getStatus()
, Constant Field Values
-
STATUS_ACTIVE
static final int STATUS_ACTIVE
The connection is in use- See Also:
getStatus()
, Constant Field Values
-
STATUS_OFFLINE
static final int STATUS_OFFLINE
The connection is in use by the house keeping thread- See Also:
getStatus()
, Constant Field Values
-
-
Method Detail
-
getBirthTime
long getBirthTime()
The time that this connection was created. The number of milliseconds since midnight, January 1, 1970 UTC.
-
getBirthDate
java.util.Date getBirthDate()
LikegetBirthTime()
but in Date format- Returns:
- birthDate
-
getAge
long getAge()
The age in millseconds since this connection was built
-
getId
long getId()
A unique ID for this connection
-
getMark
int getMark()
Sometimes we want do something to a connection but can't because it is still active and we don't want to disrupt its use. So we mark it instead and when it stops being active we can perform the necessary operation. The only thing we do at the moment isexpire
the connection (if it is too old for instance). And this will happen if the housekeeper decides it should but the connection is still active.
-
getStatus
int getStatus()
-
getTimeLastStartActive
long getTimeLastStartActive()
When this connection was last given out. The number of milliseconds since midnight, January 1, 1970 UTC.
-
getTimeLastStopActive
long getTimeLastStopActive()
When this connection was last given back (or zero if it is still active). The number of milliseconds since midnight, January 1, 1970 UTC.
-
getRequester
java.lang.String getRequester()
The name of the thread that asked for this connection.
-
getProxyHashcode
java.lang.String getProxyHashcode()
The hashcode (in hex) of the ProxyConnection object. This uniquely identifies this proxy connection.- Returns:
- proxyHashcode
-
getDelegateHashcode
java.lang.String getDelegateHashcode()
The hashcode (in hex) of the delegate connection object. This uniquely identifies the underlying connection.- Returns:
- delegateHashcode
-
getDelegateUrl
java.lang.String getDelegateUrl()
The URL that this connection is using (the definition might have changed since this connection was built).- Returns:
- delegateUrl
-
getSqlCalls
java.lang.String[] getSqlCalls()
A log of the last SQL used on this connection. Only populated ifConnectionPoolDefinitionIF.isTrace()
is enabled.- Returns:
- the most recent SQL to be used
-
-