Package com.newrelic.agent.bridge
Interface Token
-
- All Superinterfaces:
com.newrelic.api.agent.Token
- All Known Implementing Classes:
NoOpToken
@Deprecated public interface Token extends com.newrelic.api.agent.TokenDeprecated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanexpire()Deprecated.Once a token is taken from a transaction, the transaction will remain open until the token is expired.com.newrelic.api.agent.TransactiongetTransaction()Deprecated.Returns the transaction associated with the token.booleanisActive()Deprecated.Returns true if the token can be used to link work.booleanlink()Deprecated.Links the transaction associated with the token to the current thread.booleanlinkAndExpire()Deprecated.Links the transaction associated with the token to the current thread and expires the token.
-
-
-
Method Detail
-
expire
boolean expire()
Deprecated.Once a token is taken from a transaction, the transaction will remain open until the token is expired. This means a token can be used to join multiple units of work together.- Specified by:
expirein interfacecom.newrelic.api.agent.Token- Returns:
- True if the token was found and expired.
-
link
boolean link()
Deprecated.Links the transaction associated with the token to the current thread. Linking does not start tracing work on the thread. @Trace must be called to begin tracing work to be put into the transaction.- Specified by:
linkin interfacecom.newrelic.api.agent.Token- Returns:
- Returns true if the current thread has been linked to the token's transaction.
-
linkAndExpire
boolean linkAndExpire()
Deprecated.Links the transaction associated with the token to the current thread and expires the token. If linking fails for any reason the token will still be expired. Linking does not start tracing work on the thread. @Trace must be called to begin tracing work to be put into the transaction.- Specified by:
linkAndExpirein interfacecom.newrelic.api.agent.Token- Returns:
- Returns true if the current thread has been linked to the token's transaction and the token has been expired, false otherwise. Note: The token will be expired (if found) even if the result of this call is "false".
-
isActive
boolean isActive()
Deprecated.Returns true if the token can be used to link work. Returns false if the token has already been expired meaning it can no longer be used to link work.- Specified by:
isActivein interfacecom.newrelic.api.agent.Token- Returns:
- True if the token is active and can be used, false if the token has been expired.
-
getTransaction
com.newrelic.api.agent.Transaction getTransaction()
Deprecated.Returns the transaction associated with the token.- Returns:
- Returns the transaction associated with the token or null if there is not one.
-
-