Package io.grpc.internal
Class InsightBuilder
- java.lang.Object
-
- io.grpc.internal.InsightBuilder
-
public final class InsightBuilder extends java.lang.Object
Builds a concise and readable string that gives insight of the concerned part of the system. The resulted string is made up of a list of short strings, each of which gives out a piece of information.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<java.lang.String>
buffer
-
Constructor Summary
Constructors Constructor Description InsightBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InsightBuilder
append(java.lang.Object insight)
Appends a piece of information which is a plain string.InsightBuilder
appendKeyValue(java.lang.String key, java.lang.Object value)
Appends a piece of information which is a key-value , which will be formatted into"key=value"
.java.lang.String
toString()
Get the resulting string.
-
-
-
Method Detail
-
append
public InsightBuilder append(@Nullable java.lang.Object insight)
Appends a piece of information which is a plain string. The given object is immediately converted to string and recorded.
-
appendKeyValue
public InsightBuilder appendKeyValue(java.lang.String key, @Nullable java.lang.Object value)
Appends a piece of information which is a key-value , which will be formatted into"key=value"
. Value'stoString()
ornull
is immediately recorded.
-
toString
public java.lang.String toString()
Get the resulting string.- Overrides:
toString
in classjava.lang.Object
-
-