org.logicalcobwebs.proxool

Interface ConnectionInfoIF

All Superinterfaces:
Comparable
Known Subinterfaces:
ProxyConnectionIF
Known Implementing Classes:
ProxyConnection

public interface ConnectionInfoIF
extends Comparable

Provides information about an individual connection. You can get a collection of these from ProxoolFacade. 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 $
Authors:
billhorsman
$Author: billhorsman $ (current maintainer)

Field Summary

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 normal
static int
STATUS_ACTIVE
The connection is in use
static int
STATUS_AVAILABLE
The connection is available for use
static int
STATUS_NULL
This is the start and end state of every connection
static int
STATUS_OFFLINE
The connection is in use by the house keeping thread

Method Summary

long
getAge()
The age in millseconds since this connection was built
Date
getBirthDate()
Like getBirthTime() but in Date format
long
getBirthTime()
The time that this connection was created.
String
getDelegateHashcode()
The hashcode (in hex) of the delegate connection object.
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 connection
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.
String
getProxyHashcode()
The hashcode (in hex) of the ProxyConnection object.
String
getRequester()
The name of the thread that asked for this connection.
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 Details

MARK_FOR_EXPIRY

public static final int MARK_FOR_EXPIRY
The next time this connection is made available we should expire it.
Field Value:
1

MARK_FOR_USE

public static final int MARK_FOR_USE
Default - treat as normal
Field Value:
0

STATUS_ACTIVE

public static final int STATUS_ACTIVE
The connection is in use
Field Value:
2

STATUS_AVAILABLE

public static final int STATUS_AVAILABLE
The connection is available for use
Field Value:
1

STATUS_NULL

public static final int STATUS_NULL
This is the start and end state of every connection
Field Value:
0

STATUS_OFFLINE

public static final int STATUS_OFFLINE
The connection is in use by the house keeping thread
Field Value:
3

Method Details

getAge

public long getAge()
The age in millseconds since this connection was built

getBirthDate

public Date getBirthDate()
Like getBirthTime() but in Date format
Returns:
birthDate

getBirthTime

public long getBirthTime()
The time that this connection was created. The number of milliseconds since midnight, January 1, 1970 UTC.

getDelegateHashcode

public String getDelegateHashcode()
The hashcode (in hex) of the delegate connection object. This uniquely identifies the underlying connection.
Returns:
delegateHashcode

getDelegateUrl

public String getDelegateUrl()
The URL that this connection is using (the definition might have changed since this connection was built).
Returns:
delegateUrl

getId

public long getId()
A unique ID for this connection

getMark

public int getMark()

getProxyHashcode

public String getProxyHashcode()
The hashcode (in hex) of the ProxyConnection object. This uniquely identifies this proxy connection.
Returns:
proxyHashcode

getRequester

public String getRequester()
The name of the thread that asked for this connection.

getSqlCalls

public String[] getSqlCalls()
Returns:
the most recent SQL to be used

getStatus

public int getStatus()

getTimeLastStartActive

public long getTimeLastStartActive()
When this connection was last given out. The number of milliseconds since midnight, January 1, 1970 UTC.

getTimeLastStopActive

public 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.