public interface Token
Transaction
associated with the token. This results in two or more pieces of work being tied together into a single
Transaction
. A token is created by a call to Transaction.getToken()
.Modifier and Type | Method and Description |
---|---|
boolean |
expire()
Invalidates the token, making it unable to link work together in a
Transaction . |
boolean |
isActive()
Checks if a token is valid and can be used to link work to the originating
Transaction associated with
the token. |
boolean |
link()
Links the work being done on the current thread back to the originating
Transaction associated with the
token. |
boolean |
linkAndExpire()
Links the work being done on the current thread back to the originating
Transaction associated with the
token and expires the token. |
boolean link()
Transaction
associated with the
token.
Linking alone does not start tracing work on the thread. To begin tracing work on methods that should be
included in the transaction, you should use the @Trace(async = true) annotation.boolean expire()
Transaction
. When a token is expired
it can no longer be used.
If a Token
is not explicitly expired it will be timed out according to the token_timeout
value which is user configurable in the yaml file or by a Java system property.
When all tokens are expired the transaction will be allowed to finish.boolean linkAndExpire()
Transaction
associated with the
token and expires the token. If linking fails for any reason the token will still be expired. This provides an
alternative to separately calling link()
and expire()
.boolean isActive()
Transaction
associated with
the token.