|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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()
ConnectionInfoIF
ConnectionInfoIF.getBirthTime()
but in Date format
getBirthDate
in interface ConnectionInfoIF
public long getBirthTime()
ConnectionInfoIF
getBirthTime
in interface ConnectionInfoIF
public void setBirthDate(java.util.Date birthDate)
public long getAge()
ConnectionInfoIF
getAge
in interface ConnectionInfoIF
public void setAge(long age)
public long getId()
ConnectionInfoIF
getId
in interface ConnectionInfoIF
public void setId(long id)
public int getMark()
ConnectionInfoIF
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.
getMark
in interface ConnectionInfoIF
public void setMark(int mark)
public int getStatus()
ConnectionInfoIF
null
,
available
,
active
or
offline
.
getStatus
in interface ConnectionInfoIF
public void setStatus(int status)
public long getTimeLastStartActive()
ConnectionInfoIF
getTimeLastStartActive
in interface ConnectionInfoIF
public void setTimeLastStartActive(long timeLastStartActive)
public long getTimeLastStopActive()
ConnectionInfoIF
getTimeLastStopActive
in interface ConnectionInfoIF
public void setTimeLastStopActive(long timeLastStopActive)
public java.lang.String getRequester()
ConnectionInfoIF
getRequester
in interface ConnectionInfoIF
public 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 ConnectionInfoIF
public void setDelegateUrl(java.lang.String delegateUrl)
public java.lang.String getProxyHashcode()
ConnectionInfoIF
getProxyHashcode
in interface ConnectionInfoIF
public void setProxyHashcode(java.lang.String proxyHashcode)
public java.lang.String getDelegateHashcode()
ConnectionInfoIF
getDelegateHashcode
in interface ConnectionInfoIF
public void setDelegateHashcode(java.lang.String delegateHashcode)
public int compareTo(java.lang.Object o)
getId()
compareTo
in interface java.lang.Comparable
o
- must be another ConnectionInfoIF
implementation
Comparable.compareTo(Object)
public java.lang.String[] getSqlCalls()
ConnectionInfoIF
ConnectionPoolDefinitionIF.isTrace()
is enabled.
getSqlCalls
in interface ConnectionInfoIF
public void addSqlCall(java.lang.String sqlCall)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |