Package io.opencensus.tags
Class NoopTags.NoopTagContextBinarySerializer
java.lang.Object
io.opencensus.tags.propagation.TagContextBinarySerializer
io.opencensus.tags.NoopTags.NoopTagContextBinarySerializer
- Enclosing class:
NoopTags
@Immutable
private static final class NoopTags.NoopTagContextBinarySerializer
extends TagContextBinarySerializer
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final byte[]
(package private) static final TagContextBinarySerializer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromByteArray
(byte[] bytes) Creates aTagContext
from the given on-the-wire encoded representation.byte[]
toByteArray
(TagContext tags) Serializes theTagContext
into the on-the-wire representation.
-
Field Details
-
INSTANCE
-
EMPTY_BYTE_ARRAY
static final byte[] EMPTY_BYTE_ARRAY
-
-
Constructor Details
-
NoopTagContextBinarySerializer
private NoopTagContextBinarySerializer()
-
-
Method Details
-
toByteArray
Description copied from class:TagContextBinarySerializer
Serializes theTagContext
into the on-the-wire representation.This method should be the inverse of
TagContextBinarySerializer.fromByteArray(byte[])
.Tag
s that have aTagMetadata
withTagMetadata.TagTtl.NO_PROPAGATION
will not be serialized.- Specified by:
toByteArray
in classTagContextBinarySerializer
- Parameters:
tags
- theTagContext
to serialize.- Returns:
- the on-the-wire representation of a
TagContext
.
-
fromByteArray
Description copied from class:TagContextBinarySerializer
Creates aTagContext
from the given on-the-wire encoded representation.This method should be the inverse of
TagContextBinarySerializer.toByteArray(io.opencensus.tags.TagContext)
.- Specified by:
fromByteArray
in classTagContextBinarySerializer
- Parameters:
bytes
- on-the-wire representation of aTagContext
.- Returns:
- a
TagContext
deserialized frombytes
.
-