Package overit.geocall.sql
Class PooledConnectionInfo
java.lang.Object
overit.geocall.sql.PooledConnectionInfo
Object that stores the information about the
PooledConnection-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected intprotected booleanprotected longDate (in milliseconds from the 1st January 1970) of the last opening of connectionprotected Stringprotected DBFieldMapprotected longDate (in milliseconds from the 1st January 1970) of the last usages request of connectionprotected longDate (in milliseconds from the 1st January 1970) of the last connection release -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConnects a Connection, sets the DataBase typeDBType, the SID and the time of the last opening of connectionReturns the string that describes the activity of the connectionReturns the DataBase type on which the connection worksintgetId()Returns the idReturns the current or the last client identification codeReturns the current or the last field map of mthe identity asking for the connectiongetSid()Returns the unique name that uniquely identifies the databasebooleanidle()Checks if the connection is idle or notlongReturns the time passed from the last opening of connectionlonglastGet()Returns the time passed from the last usages request of connectionlongReturns the time passed from the last connection releaseprotected StringquerySid(Connection connection)
-
Field Details
-
_activity
-
_lastconnect
protected long _lastconnectDate (in milliseconds from the 1st January 1970) of the last opening of connection -
_lastget
protected long _lastgetDate (in milliseconds from the 1st January 1970) of the last usages request of connection -
_lastrelease
protected long _lastreleaseDate (in milliseconds from the 1st January 1970) of the last connection release -
_id
protected int _id -
_idle
protected boolean _idle -
_lastDBClientIdentifier
-
_lastDBFieldMap
-
-
Constructor Details
-
PooledConnectionInfo
public PooledConnectionInfo()Creates a PooledConnectionInfo object
-
-
Method Details
-
connected
Connects a Connection, sets the DataBase typeDBType, the SID and the time of the last opening of connection- Parameters:
c- TheConnection- Throws:
SQLException- If a database access error occurs anSQLExceptionwill be raised
-
querySid
-
getSid
Returns the unique name that uniquely identifies the database- Returns:
- The string that represents the SID, the name of the database
-
getDBType
Returns the DataBase type on which the connection works- Returns:
- The
DBType
-
lastGet
public long lastGet()Returns the time passed from the last usages request of connection- Returns:
- The time (in milliseconds from the 1st January 1970) passed from the last usages request
-
lastConnect
public long lastConnect()Returns the time passed from the last opening of connection- Returns:
- The time (in milliseconds from the 1st January 1970) passed from the last opening
-
lastRelease
public long lastRelease()Returns the time passed from the last connection release- Returns:
- The time (in milliseconds from the 1st January 1970) passed from the last release
-
getActivity
Returns the string that describes the activity of the connection- Returns:
- The string that describes the activity
-
idle
public boolean idle()Checks if the connection is idle or not- Returns:
trueif the connection is idle,falseotherwise
-
getId
public int getId()Returns the id- Returns:
- The id
-
getLastDBClientIdentier
Returns the current or the last client identification code- Returns:
- the current or the last client identification code
-
getLastDBFieldMap
Returns the current or the last field map of mthe identity asking for the connection- Returns:
- the current or the last field map of mthe identity asking for the connection
-