Interface ConnectionInfo
- All Known Implementing Classes:
MockConnectionInfo
-
Method Summary
Modifier and TypeMethodDescriptionintReturns how many timesConnection.commitTransaction()method is called.Get ID for the connection.Retrieve originalConnection.intReturns how many timesConnection.rollbackTransaction()method is called.intReturns how many timesConnection.beginTransaction()method is called.RetrieveValueStorewhich is associated to the scope of logical connection.voidIncrement commit count.voidIncrement rollback count.voidIncrement transaction count.booleanisClosed()Returns whether connection is closed or not.voidsetClosed(boolean closed) Setbooleanto indicate whether the connection is closed or not.
-
Method Details
-
getOriginalConnection
Retrieve originalConnection.- Returns:
- connection;
nullis returned whenConnectionInfois evaluated before it is associated with an actual connection, for example, duringProxyExecutionListener.beforeMethod(MethodExecutionInfo)forConnectionFactory.create().
-
getConnectionId
Get ID for the connection.- Returns:
- connection ID;
nullis returned whenConnectionInfois evaluated before it is associated with an actual connection, for example, duringProxyExecutionListener.beforeMethod(MethodExecutionInfo)forConnectionFactory.create(). - See Also:
-
incrementTransactionCount
void incrementTransactionCount()Increment transaction count. -
incrementCommitCount
void incrementCommitCount()Increment commit count. -
incrementRollbackCount
void incrementRollbackCount()Increment rollback count. -
getTransactionCount
int getTransactionCount()Returns how many timesConnection.beginTransaction()method is called.- Returns:
- num of beginTransaction() method being called
-
getCommitCount
int getCommitCount()Returns how many timesConnection.commitTransaction()method is called.- Returns:
- num of commitTransaction method being called
-
getRollbackCount
int getRollbackCount()Returns how many timesConnection.rollbackTransaction()method is called.- Returns:
- num of rollback methods being called
-
isClosed
boolean isClosed()Returns whether connection is closed or not.- Returns:
trueif connection is closed
-
setClosed
void setClosed(boolean closed) Setbooleanto indicate whether the connection is closed or not.- Parameters:
closed- settrueifConnectionis closed
-
getValueStore
ValueStore getValueStore()RetrieveValueStorewhich is associated to the scope of logical connection.Values can be stored or retrieved from this store while connection is available.
- Returns:
- value store
-