org.logicalcobwebs.proxool
接口 ConnectionInfoIF

所有超级接口:
Comparable
所有已知子接口:
ProxyConnectionIF
所有已知实现类:
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();
   ...
 }
 

版本:
$Revision: 1.12 $, $Date: 2005/10/07 08:18:23 $
作者:
billhorsman, $Author: billhorsman $ (current maintainer)

字段摘要
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
 
方法摘要
 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).
 
从接口 java.lang.Comparable 继承的方法
compareTo
 

字段详细信息

MARK_FOR_USE

static final int MARK_FOR_USE
Default - treat as normal

另请参见:
getMark(), 常量字段值

MARK_FOR_EXPIRY

static final int MARK_FOR_EXPIRY
The next time this connection is made available we should expire it.

另请参见:
getMark(), 常量字段值

STATUS_NULL

static final int STATUS_NULL
This is the start and end state of every connection

另请参见:
getStatus(), 常量字段值

STATUS_AVAILABLE

static final int STATUS_AVAILABLE
The connection is available for use

另请参见:
getStatus(), 常量字段值

STATUS_ACTIVE

static final int STATUS_ACTIVE
The connection is in use

另请参见:
getStatus(), 常量字段值

STATUS_OFFLINE

static final int STATUS_OFFLINE
The connection is in use by the house keeping thread

另请参见:
getStatus(), 常量字段值
方法详细信息

getBirthTime

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


getBirthDate

Date getBirthDate()
Like getBirthTime() but in Date format

返回:
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 is expire 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()
The status of the connection. Can be either: null, available, active or offline.


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

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


getProxyHashcode

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

返回:
proxyHashcode

getDelegateHashcode

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

返回:
delegateHashcode

getDelegateUrl

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

返回:
delegateUrl

getSqlCalls

String[] getSqlCalls()
A log of the last SQL used on this connection. Only populated if ConnectionPoolDefinitionIF.isTrace() is enabled.

返回:
the most recent SQL to be used


Copyright © 2014. All rights reserved.