Package overit.geocall.sql
Class PoolEvent
java.lang.Object
overit.geocall.util.EventHistory.Event
overit.geocall.sql.PoolEvent
- All Implemented Interfaces:
Comparable
This class defines a (weighed) event that occurs in the connection pool and can be traced
for reasons of maintenance of an operation history, logging and debugging.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected longprotected Stringprotected longprotected longprotected longFields inherited from class overit.geocall.util.EventHistory.Event
_sequence -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the string that defines the activity associated to the eventlongReturns the information about the last opening of the connection associated to the eventReturns the string that defines the last client identifier, for the DB, associated to the eventlongReturns the information about the last usages request of connection associated to the eventlongReturns the information about the last release of the connection associated to the eventlonggetTime()Returns the difference between the time of last release and the last usages requestlongReturns the weight of the eventMethods inherited from class overit.geocall.util.EventHistory.Event
compareTo, equals, getId, hashCode
-
Field Details
-
_time
protected long _time -
_activity
-
_lastConnect
protected long _lastConnect -
_lastGet
protected long _lastGet -
_lastRelease
protected long _lastRelease -
_lastDBClientIdentifier
-
-
Constructor Details
-
PoolEvent
Creates a new PoolEvent- Parameters:
activity- The activity associated to the eventlastConnect- The last connection valuelastGet- The last usages request of connection valuelastRelease- The last release value
-
PoolEvent
public PoolEvent(String lastDBClientIdentifier, String activity, long lastConnect, long lastGet, long lastRelease) Creates a new PoolEvent- Parameters:
lastDBClientIdentifier- A string that describes the client identifier, for the DB, associated to the eventactivity- The activity associated to the eventlastConnect- The last connection valuelastGet- The last usages request of connection valuelastRelease- The last release value
-
-
Method Details
-
getActivity
Returns the string that defines the activity associated to the event- Returns:
- The activity associated to the event
-
getLastConnect
public long getLastConnect()Returns the information about the last opening of the connection associated to the event- Returns:
- The last connection value
-
getLastGet
public long getLastGet()Returns the information about the last usages request of connection associated to the event- Returns:
- The last usages request of connection value
-
getLastRelease
public long getLastRelease()Returns the information about the last release of the connection associated to the event- Returns:
- The last release value
-
getTime
public long getTime()Returns the difference between the time of last release and the last usages request- Returns:
- last release - last usages request
-
getLastDBClientIdentifier
Returns the string that defines the last client identifier, for the DB, associated to the event- Returns:
- The last DB client identifier
-
getWeight
public long getWeight()Returns the weight of the event- Specified by:
getWeightin classEventHistory.Event- Returns:
getTime()
-