Package com.linkedin.venice.pubsub
Class PubSubPositionDeserializer
java.lang.Object
com.linkedin.venice.pubsub.PubSubPositionDeserializer
Utility for converting serialized
PubSubPositionWireFormat
data into concrete PubSubPosition
instances using a configured PubSubPositionTypeRegistry
.
This class offers static access to a default deserializer instance backed by the reserved registry. In most production cases, callers are encouraged to instantiate their own deserializer with a custom registry instead of relying on the default static entry point.
Deserialization involves reading the type ID from the wire format and delegating to the corresponding
PubSubPositionFactory
to produce the appropriate position implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PubSubPositionDeserializer
Note: The following default instance is only for convenience purposes until we've updated all the code to use pass the registry and resolver explicitly. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToPosition
(byte[] positionWireFormatBytes) convertToPosition
(PubSubPositionWireFormat positionWireFormat) Converts a wire format position to a PubSubPositionconvertToPosition
(ByteBuffer positionWireFormatBytes) static PubSubPosition
getPositionFromWireFormat
(byte[] positionWireFormatBytes) static PubSubPosition
getPositionFromWireFormat
(PubSubPositionWireFormat positionWireFormat)
-
Field Details
-
DEFAULT_DESERIALIZER
Note: The following default instance is only for convenience purposes until we've updated all the code to use pass the registry and resolver explicitly.
-
-
Constructor Details
-
PubSubPositionDeserializer
-
-
Method Details
-
convertToPosition
Converts a wire format position to a PubSubPosition- Parameters:
positionWireFormat
- the wire format position- Returns:
- concrete position object represented by the wire format
-
convertToPosition
-
convertToPosition
-
getPositionFromWireFormat
-
getPositionFromWireFormat
-