Class ModelEventWireCodec
java.lang.Object
io.fluxzero.common.api.modeling.ModelEventWireCodec
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 Summary
Modifier and TypeMethodDescriptionstatic JsonTypetryDecode(byte[] bytes) Decodes this codec's representation, or returnsnullfor another transport format.static byte[]Encodes a homogeneous compact model-event request or result batch.static byte[]Encodes routed native envelopes only for a peer that explicitly supports them.
-
Method Details
-
tryEncode
Encodes a homogeneous compact model-event request or result batch.- Throws:
IOException
-
tryEncode
Encodes routed native envelopes only for a peer that explicitly supports them.- Throws:
IOException
-
tryDecode
Decodes this codec's representation, or returnsnullfor another transport format.- Throws:
IOException
-