PooledTracePacketArray


@DelicateTracingApi
public final class PooledTracePacketArray extends Poolable


Summary

Public methods

final void
forEach(@NonNull Function1<@NonNull TraceEventUnit> block)
final int

Number of items present in packets with valid data - all others have been reset with TraceEvent.reset

final @NonNull TraceEvent[]

Array of packets, all pre-allocated, and never modified.

void

Recycles the object, and hands it back to the pool.

final void
setFillCount(int value)

Number of items present in packets with valid data - all others have been reset with TraceEvent.reset

Public methods

forEach

Added in 2.0.0-alpha01
public final void forEach(@NonNull Function1<@NonNull TraceEventUnit> block)

getFillCount

public final int getFillCount()

Number of items present in packets with valid data - all others have been reset with TraceEvent.reset

getPackets

public final @NonNull TraceEvent[] getPackets()

Array of packets, all pre-allocated, and never modified.

This is an Array to simplify data access.

recycle

public void recycle()

Recycles the object, and hands it back to the pool.

setFillCount

public final void setFillCount(int value)

Number of items present in packets with valid data - all others have been reset with TraceEvent.reset