Class ModelEventWireCodec

java.lang.Object
io.fluxzero.common.api.modeling.ModelEventWireCodec

public final class ModelEventWireCodec extends Object
Compact websocket representation for model-stream reads.

Model-event responses contain many small memberships. Encoding those as generic CBOR objects costs substantially more CPU and allocation than loading the underlying rows. This codec preserves the same protocol objects while representing their fixed fields directly.

  • Method Details

    • tryEncode

      public static byte[] tryEncode(JsonType value) throws IOException
      Encodes a homogeneous compact model-event request or result batch.
      Throws:
      IOException
    • tryDecode

      public static JsonType tryDecode(byte[] bytes) throws IOException
      Decodes this codec's representation, or returns null for another transport format.
      Throws:
      IOException