public class DefaultTransaction extends AbstractMessage implements Transaction
m_status| 构造器和说明 |
|---|
DefaultTransaction(String type,
String name) |
DefaultTransaction(String type,
String name,
MessageManager manager) |
| 限定符和类型 | 方法和说明 |
|---|---|
DefaultTransaction |
addChild(Message message)
Add one nested child message to current transaction.
|
void |
complete()
Complete the message construction.
|
List<Message> |
getChildren()
Get all children message within current transaction.
|
long |
getDurationInMicros()
How long the transaction took from construction to complete.
|
long |
getDurationInMillis()
How long the transaction took from construction to complete.
|
protected MessageManager |
getManager() |
boolean |
hasChildren()
Has children or not.
|
boolean |
isStandalone()
Check if the transaction is stand-alone or belongs to another one.
|
void |
setDurationInMicros(long duration) |
void |
setDurationInMillis(long duration)
set duration in millisecond.
|
void |
setDurationStart(long durationStart) |
void |
setStandalone(boolean standalone) |
void |
setStatus(Throwable e)
Set the message status with exception class name.
|
addData, addData, getData, getName, getStatus, getTimestamp, getType, isCompleted, isSuccess, setCompleted, setData, setName, setStatus, setSuccessStatus, setTimestamp, setType, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddData, addData, getData, getName, getStatus, getTimestamp, getType, isCompleted, isSuccess, setStatus, setSuccessStatus, setTimestamppublic DefaultTransaction(String type, String name, MessageManager manager)
public DefaultTransaction addChild(Message message)
TransactionaddChild 在接口中 Transactionmessage - to be addedpublic void complete()
Messagepublic List<Message> getChildren()
Transaction
Typically, a Transaction can nest other Transactions, Events and
Heartbeat s, while an Event or Heartbeat can't nest other messages.
getChildren 在接口中 Transactionpublic long getDurationInMicros()
TransactiongetDurationInMicros 在接口中 Transactionpublic void setDurationInMicros(long duration)
public long getDurationInMillis()
TransactiongetDurationInMillis 在接口中 Transactionpublic void setDurationInMillis(long duration)
TransactionsetDurationInMillis 在接口中 Transactionprotected MessageManager getManager()
public boolean hasChildren()
TransactionhasChildren 在接口中 Transactionpublic boolean isStandalone()
TransactionisStandalone 在接口中 Transactionpublic void setStandalone(boolean standalone)
public void setDurationStart(long durationStart)
Copyright © 2022. All rights reserved.