Top Fields Constructors Methods
io.opentelemetry.api.trace

pack-priv final Class ImmutableTraceFlags

extends Object
implements TraceFlags
Class Inheritance
All Implemented Interfaces
io.opentelemetry.api.trace.TraceFlags
Annotations
@Immutable
Imports
io.opentelemetry.api.internal.OtelEncodingUtils, java.util.Objects, javax.annotation.concurrent.Immutable

Field Summary

Modifier and TypeField and Description
private final byte
pack-priv static final ImmutableTraceFlags
pack-priv static final int
private final String
private static final ImmutableTraceFlags[]
pack-priv static final ImmutableTraceFlags
private static final byte

Constructor Summary

AccessConstructor and Description
private
ImmutableTraceFlags(byte byteRep)

Method Summary

Modifier and TypeMethod and Description
public byte
asByte()

Implements io.opentelemetry.api.trace.TraceFlags.asByte.

Returns the byte representation of this TraceFlags.

public String
asHex()

Implements io.opentelemetry.api.trace.TraceFlags.asHex.

Returns the lowercase hex (base16) representation of this TraceFlags.

private static ImmutableTraceFlags[]
pack-priv static ImmutableTraceFlags
fromByte(byte
the byte representation of the TraceFlags.
traceFlagsByte
)

Hides io.opentelemetry.api.trace.TraceFlags.fromByte.

Returns the TraceFlags converted from the given byte representation.

pack-priv static ImmutableTraceFlags
fromHex(CharSequence
the buffer where the hex (base16) representation of the TraceFlags is.
src
,
int
the offset int buffer.
srcOffset
)

Hides io.opentelemetry.api.trace.TraceFlags.fromHex.

Returns the TraceFlags converted from the given lowercase hex (base16) representation.

public boolean
isSampled()

Implements io.opentelemetry.api.trace.TraceFlags.isSampled.

Returns true if the sampling bit is on for this TraceFlags, otherwise false.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

byteRepback to summary
private final byte byteRep
DEFAULTback to summary
pack-priv static final ImmutableTraceFlags DEFAULT
HEX_LENGTHback to summary
pack-priv static final int HEX_LENGTH
hexRepback to summary
private final String hexRep
INSTANCESback to summary
private static final ImmutableTraceFlags[] INSTANCES
SAMPLEDback to summary
pack-priv static final ImmutableTraceFlags SAMPLED
SAMPLED_BITback to summary
private static final byte SAMPLED_BIT

Constructor Detail

ImmutableTraceFlagsback to summary
private ImmutableTraceFlags(byte byteRep)

Method Detail

asByteback to summary
public byte asByte()

Implements io.opentelemetry.api.trace.TraceFlags.asByte.

Doc from io.opentelemetry.api.trace.TraceFlags.asByte.

Returns the byte representation of this TraceFlags.

Returns:byte

the byte representation of the TraceFlags.

Annotations
@Override
asHexback to summary
public String asHex()

Implements io.opentelemetry.api.trace.TraceFlags.asHex.

Doc from io.opentelemetry.api.trace.TraceFlags.asHex.

Returns the lowercase hex (base16) representation of this TraceFlags.

Returns:String

the byte representation of the TraceFlags.

Annotations
@Override
buildInstancesback to summary
private static ImmutableTraceFlags[] buildInstances()
fromByteback to summary
pack-priv static ImmutableTraceFlags fromByte(byte traceFlagsByte)

Hides io.opentelemetry.api.trace.TraceFlags.fromByte.

Doc from io.opentelemetry.api.trace.TraceFlags.fromByte.

Returns the TraceFlags converted from the given byte representation.

Parameters
traceFlagsByte:byte

the byte representation of the TraceFlags.

Returns:ImmutableTraceFlags

the TraceFlags converted from the given byte representation.

fromHexback to summary
pack-priv static ImmutableTraceFlags fromHex(CharSequence src, int srcOffset)

Hides io.opentelemetry.api.trace.TraceFlags.fromHex.

Doc from io.opentelemetry.api.trace.TraceFlags.fromHex.

Returns the TraceFlags converted from the given lowercase hex (base16) representation.

This may throw runtime exceptions if the input is invalid.

Parameters
src:CharSequence

the buffer where the hex (base16) representation of the TraceFlags is.

srcOffset:int

the offset int buffer.

Returns:ImmutableTraceFlags

the TraceFlags converted from the given lowercase hex (base16) representation.

isSampledback to summary
public boolean isSampled()

Implements io.opentelemetry.api.trace.TraceFlags.isSampled.

Doc from io.opentelemetry.api.trace.TraceFlags.isSampled.

Returns true if the sampling bit is on for this TraceFlags, otherwise false.

Returns:boolean

true if the sampling bit is on for this TraceFlags, otherwise * false.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override