|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.infrared.agent.ApiTime
This class measures and stores the timing information of an API execution.
This can be used to record the start and end times of an API execution.
| Constructor Summary | |
ApiTime(ApiTime anotherApiTime)
|
|
ApiTime(ApiTime anotherApiTime,
IdMapper idMapper)
Copy constructor for making a new ApiTime with the same attributes as a given ApiTime. |
|
ApiTime(String apiName,
String apiType)
Constructs an ApiTime representing a given API and which is of a given type. |
|
| Method Summary | |
boolean |
equals(Object o)
|
Api |
getApi()
|
String |
getApiName()
Gets the name of the API reprsented by this ApiTime. |
String |
getApiType()
Gets the type of the API represented by this ApiTime. |
SqlStatisticsMap |
getSqlStatisticsMap()
|
long |
getTime()
Gets the time which the API represented by this ApiTime took for execution. |
int |
hashCode()
|
boolean |
hasSqlStatistics()
|
void |
recordExecuteError(Long id,
long time,
boolean prepared)
Record a failed execute |
void |
recordExecuteSql(Long id,
long time,
boolean prepared)
Record a call to execute a statement |
void |
recordFetchComplete(Long id,
long noOfRowsFetched,
long timeTakenForFetch)
|
void |
recordPrepareSql(Long id,
long time)
Record a call to prepare a sql statement |
void |
setTime(long time)
|
String |
toString()
String representation of this object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ApiTime(String apiName,
String apiType)
apiName - the name of the API whose execution this ApiTime representsapiType - the type of the API, typically the layer in which this API is invoked, can be null
IllegalArgumentException - if apiName or apiType specified if null
public ApiTime(ApiTime anotherApiTime,
IdMapper idMapper)
anotherApiTime - the ApiTime whose copy is to be made.public ApiTime(ApiTime anotherApiTime)
| Method Detail |
public String getApiName()
public String getApiType()
public long getTime()
public void setTime(long time)
public String toString()
public boolean equals(Object o)
public int hashCode()
public Api getApi()
public void recordPrepareSql(Long id,
long time)
id - - id of sql querytime - - time spent in preparing
public void recordExecuteSql(Long id,
long time,
boolean prepared)
id - - id of sql querytime - - time spent in executing the queryprepared - - was it a prepared statement or plain statement
public void recordExecuteError(Long id,
long time,
boolean prepared)
id - - id of sql querytime - - time spent in executing the queryprepared - - was it a prepared statement or plain statementpublic SqlStatisticsMap getSqlStatisticsMap()
public boolean hasSqlStatistics()
public void recordFetchComplete(Long id,
long noOfRowsFetched,
long timeTakenForFetch)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||