java.lang.Object
io.micronaut.configuration.kafka.streams.health.serde.TaskIdSerde
All Implemented Interfaces:
io.micronaut.serde.Deserializer<TaskId>, io.micronaut.serde.Serde<TaskId>, io.micronaut.serde.Serializer<TaskId>

@Singleton public final class TaskIdSerde extends Object implements io.micronaut.serde.Serde<TaskId>
A custom Serde implementation for serializing and deserializing TaskId.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.serde.Deserializer

    io.micronaut.serde.Deserializer.DecoderContext

    Nested classes/interfaces inherited from interface io.micronaut.serde.Serializer

    io.micronaut.serde.Serializer.EncoderContext
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable TaskId
    deserialize(@NonNull io.micronaut.serde.Decoder decoder, io.micronaut.serde.Deserializer.DecoderContext context, @NonNull io.micronaut.core.type.Argument<? super TaskId> type)
    Deserializes a TaskId from its string representation.
    void
    serialize(@NonNull io.micronaut.serde.Encoder encoder, io.micronaut.serde.Serializer.EncoderContext context, @NonNull io.micronaut.core.type.Argument<? extends TaskId> type, @NonNull TaskId value)
    Serializes a TaskId into its string representation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.serde.Deserializer

    allowNull, createSpecific, deserializeNullable, getDefaultValue

    Methods inherited from interface io.micronaut.serde.Serializer

    createSpecific, isAbsent, isEmpty
  • Constructor Details

    • TaskIdSerde

      public TaskIdSerde()
  • Method Details

    • deserialize

      @Nullable public @Nullable TaskId deserialize(@NonNull @NonNull io.micronaut.serde.Decoder decoder, io.micronaut.serde.Deserializer.DecoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? super TaskId> type) throws IOException
      Deserializes a TaskId from its string representation.
      Specified by:
      deserialize in interface io.micronaut.serde.Deserializer<TaskId>
      Parameters:
      decoder - The Decoder used to read the input.
      context - The deserialization context.
      type - The TaskId type argument.
      Returns:
      The deserialized TaskId.
      Throws:
      IOException - If an I/O error occurs during deserialization.
    • serialize

      public void serialize(@NonNull @NonNull io.micronaut.serde.Encoder encoder, io.micronaut.serde.Serializer.EncoderContext context, @NonNull @NonNull io.micronaut.core.type.Argument<? extends TaskId> type, @NonNull @NonNull TaskId value) throws IOException
      Serializes a TaskId into its string representation.
      Specified by:
      serialize in interface io.micronaut.serde.Serializer<TaskId>
      Parameters:
      encoder - The Encoder used to write the serialized output.
      context - The serialization context.
      type - The TaskId type argument.
      value - The TaskId instance to be serialized.
      Throws:
      IOException - If an I/O error occurs during serialization.