AttributeEntry


@DelicateTracingApi
public final class AttributeEntry


TraceEvents can contain trace attributes that apply to the entire trace. This is how that metadata is sent to the AbstractTraceSink. These objects are pooled, and we expose bare-fields because this is performance sensitive code.

End users of tracing will never use this class directly. They will only interact with it using TraceEventScope.

An androidx.tracing.AttributeEntry should only have one of longValue, or stringValue non-null when set. There can never be more than one value set.

Summary

Public fields

final Long
final String
final String

Public methods

boolean
equals(Object other)
int
final void

Resets the fields of the androidx.tracing.AttributeEntry.

@NonNull String

Public fields

longValue

Added in 2.0.0-rc01
public final Long longValue

name

Added in 2.0.0-rc01
public final String name

stringValue

Added in 2.0.0-rc01
public final String stringValue

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

reset

Added in 2.0.0-rc01
public final void reset()

Resets the fields of the androidx.tracing.AttributeEntry. This is done before reusing the object instance in a pool. AbstractTraceSink authors are not expected to call this method directly; this is automatically done when calling PooledTracePacketArray.recycle once the TraceEvent is serialized.

toString

public @NonNull String toString()