public enum NullMessage extends Enum<NullMessage> implements Transaction, Event, Metric, Trace, Heartbeat, ForkedTransaction, TaggedTransaction
| 枚举常量和说明 |
|---|
EVENT |
HEARTBEAT |
METRIC |
TRACE |
TRANSACTION |
| 限定符和类型 | 方法和说明 |
|---|---|
Transaction |
addChild(Message message)
Add one nested child message to current transaction.
|
void |
addData(String keyValuePairs)
add one or multiple key-value pairs to the message.
|
void |
addData(String key,
Object value)
add one key-value pair to the message.
|
void |
bind(String tag,
String childMessageId,
String title) |
void |
complete()
Complete the message construction.
|
void |
fork() |
List<Message> |
getChildren()
Get all children message within current transaction.
|
Object |
getData() |
long |
getDurationInMicros()
How long the transaction took from construction to complete.
|
long |
getDurationInMillis()
How long the transaction took from construction to complete.
|
String |
getForkedMessageId() |
String |
getName()
Message name.
|
String |
getParentMessageId() |
String |
getRootMessageId() |
String |
getStatus()
Get the message status.
|
String |
getTag() |
long |
getTimestamp()
The time stamp the message was created.
|
String |
getType()
Message type.
|
boolean |
hasChildren()
Has children or not.
|
boolean |
isCompleted()
If the complete() method was called or not.
|
boolean |
isStandalone()
Check if the transaction is stand-alone or belongs to another one.
|
boolean |
isSuccess() |
void |
setDurationInMillis(long durationInMills)
set duration in millisecond.
|
void |
setStatus(String status)
Set the message status.
|
void |
setStatus(Throwable e)
Set the message status with exception class name.
|
void |
setSuccessStatus() |
void |
setTimestamp(long timestamp) |
void |
start() |
static NullMessage |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static NullMessage[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final NullMessage TRANSACTION
public static final NullMessage EVENT
public static final NullMessage METRIC
public static final NullMessage TRACE
public static final NullMessage HEARTBEAT
public static NullMessage[] values()
for (NullMessage c : NullMessage.values()) System.out.println(c);
public static NullMessage valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public Transaction addChild(Message message)
TransactionaddChild 在接口中 Transactionmessage - to be addedpublic void addData(String keyValuePairs)
Messagepublic void addData(String key, Object value)
Messagepublic void bind(String tag, String childMessageId, String title)
bind 在接口中 TaggedTransactionpublic void complete()
Messagepublic void fork()
fork 在接口中 ForkedTransactionpublic 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 long getDurationInMillis()
TransactiongetDurationInMillis 在接口中 Transactionpublic void setDurationInMillis(long durationInMills)
TransactionsetDurationInMillis 在接口中 Transactionpublic String getForkedMessageId()
getForkedMessageId 在接口中 ForkedTransactionpublic String getParentMessageId()
getParentMessageId 在接口中 TaggedTransactionpublic String getRootMessageId()
getRootMessageId 在接口中 TaggedTransactionpublic void setStatus(Throwable e)
Messagepublic String getTag()
getTag 在接口中 TaggedTransactionpublic long getTimestamp()
MessagegetTimestamp 在接口中 Messagepublic void setTimestamp(long timestamp)
setTimestamp 在接口中 Messagepublic String getType()
Message
Typical message types are:
public boolean hasChildren()
TransactionhasChildren 在接口中 Transactionpublic boolean isCompleted()
MessageisCompleted 在接口中 Messagepublic boolean isStandalone()
TransactionisStandalone 在接口中 Transactionpublic void start()
start 在接口中 TaggedTransactionpublic void setSuccessStatus()
setSuccessStatus 在接口中 MessageCopyright © 2022. All rights reserved.