| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.logicalcobwebs.proxool.ConnectionInfo
class ConnectionInfo
Implementation of ConnectionInfoIF. Unlike ConnectionPool it is
 frozen and will not change. Used with a snapshot
| Field Summary | |
|---|---|
| private  long | age | 
| private  java.util.Date | birthDate | 
| private  java.lang.String | delegateDriver | 
| private  java.lang.String | delegateHashcode | 
| private  java.lang.String | delegateUrl | 
| private  long | id | 
| private  int | mark | 
| private  java.lang.String | proxyHashcode | 
| private  java.lang.String | requester | 
| private  java.util.List | sqlCalls | 
| private  int | status | 
| private  long | timeLastStartActive | 
| private  long | timeLastStopActive | 
| Fields inherited from interface org.logicalcobwebs.proxool.ConnectionInfoIF | 
|---|
| MARK_FOR_EXPIRY, MARK_FOR_USE, STATUS_ACTIVE, STATUS_AVAILABLE, STATUS_NULL, STATUS_OFFLINE | 
| Constructor Summary | |
|---|---|
| ConnectionInfo() | |
| Method Summary | |
|---|---|
|  void | addSqlCall(java.lang.String sqlCall) | 
|  int | compareTo(java.lang.Object o)Compares using getId() | 
|  long | getAge()The age in millseconds since this connection was built | 
|  java.util.Date | getBirthDate()Like ConnectionInfoIF.getBirthTime()but in Date format | 
|  long | getBirthTime()The time that this connection was created. | 
|  java.lang.String | getDelegateDriver() | 
|  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 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. | 
|  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). | 
|  void | setAge(long age) | 
|  void | setBirthDate(java.util.Date birthDate) | 
|  void | setDelegateDriver(java.lang.String delegateDriver) | 
|  void | setDelegateHashcode(java.lang.String delegateHashcode) | 
|  void | setDelegateUrl(java.lang.String delegateUrl) | 
|  void | setId(long id) | 
|  void | setMark(int mark) | 
|  void | setProxyHashcode(java.lang.String proxyHashcode) | 
|  void | setRequester(java.lang.String requester) | 
|  void | setStatus(int status) | 
|  void | setTimeLastStartActive(long timeLastStartActive) | 
|  void | setTimeLastStopActive(long timeLastStopActive) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private java.util.Date birthDate
private long age
private long id
private int mark
private int status
private long timeLastStartActive
private long timeLastStopActive
private java.lang.String requester
private java.lang.String delegateDriver
private java.lang.String delegateUrl
private java.lang.String proxyHashcode
private java.lang.String delegateHashcode
private java.util.List sqlCalls
| Constructor Detail | 
|---|
ConnectionInfo()
| Method Detail | 
|---|
public java.util.Date getBirthDate()
ConnectionInfoIFConnectionInfoIF.getBirthTime() but in Date format
getBirthDate in interface ConnectionInfoIFpublic long getBirthTime()
ConnectionInfoIF
getBirthTime in interface ConnectionInfoIFpublic void setBirthDate(java.util.Date birthDate)
public long getAge()
ConnectionInfoIF
getAge in interface ConnectionInfoIFpublic void setAge(long age)
public long getId()
ConnectionInfoIF
getId in interface ConnectionInfoIFpublic void setId(long id)
public int getMark()
ConnectionInfoIFexpire 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.
getMark in interface ConnectionInfoIFpublic void setMark(int mark)
public int getStatus()
ConnectionInfoIFnull,
 available,
 active or
 offline.
getStatus in interface ConnectionInfoIFpublic void setStatus(int status)
public long getTimeLastStartActive()
ConnectionInfoIF
getTimeLastStartActive in interface ConnectionInfoIFpublic void setTimeLastStartActive(long timeLastStartActive)
public long getTimeLastStopActive()
ConnectionInfoIF
getTimeLastStopActive in interface ConnectionInfoIFpublic void setTimeLastStopActive(long timeLastStopActive)
public java.lang.String getRequester()
ConnectionInfoIF
getRequester in interface ConnectionInfoIFpublic void setRequester(java.lang.String requester)
public java.lang.String getDelegateDriver()
public void setDelegateDriver(java.lang.String delegateDriver)
public java.lang.String getDelegateUrl()
ConnectionInfoIF
getDelegateUrl in interface ConnectionInfoIFpublic void setDelegateUrl(java.lang.String delegateUrl)
public java.lang.String getProxyHashcode()
ConnectionInfoIF
getProxyHashcode in interface ConnectionInfoIFpublic void setProxyHashcode(java.lang.String proxyHashcode)
public java.lang.String getDelegateHashcode()
ConnectionInfoIF
getDelegateHashcode in interface ConnectionInfoIFpublic void setDelegateHashcode(java.lang.String delegateHashcode)
public int compareTo(java.lang.Object o)
getId()
compareTo in interface java.lang.Comparableo - must be another ConnectionInfoIF implementation
Comparable.compareTo(Object)public java.lang.String[] getSqlCalls()
ConnectionInfoIFConnectionPoolDefinitionIF.isTrace()
 is enabled.
getSqlCalls in interface ConnectionInfoIFpublic void addSqlCall(java.lang.String sqlCall)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||