public interface ITransactionAnnotationStateHandler extends IAnnotationStateHandler
RecorderAnnotation.START_TRANSACTION_TYPE
and RecorderAnnotation.END_TRANSACTION_TYPE
.
This handler manages a transaction stack, whose state can be retrieved or modified
using methods in this interface.
For obtaining an instance of this state handler, invoke DelegaterComponent.getProperty(String)
on the annotation recorder, with a property name that concatenates RecorderCore.ANNOTATION_STATE_HANDLER_PREFIX
and one of the annotation types managed by this handler.Modifier and Type | Method and Description |
---|---|
boolean |
canEndTransaction()
Returns whether a transaction can be ended, i.e. whether there is an active transaction.
|
void |
endTransaction(long interactionTime)
Ends the current transaction.
|
String |
getCurrentTransactionName()
Returns the current transaction name, or
null if there is no active
transaction. |
void |
startTransaction(String name,
long interactionTime)
Starts a new transaction, nested in the current transaction if there is one.
|
addListener, removeListener
boolean canEndTransaction()
void endTransaction(long interactionTime)
interactionTime
- void startTransaction(String name, long interactionTime)
interactionTime
- String getCurrentTransactionName()
null
if there is no active
transaction.© Copyright IBM Corp. 2013. All rights reserved.