Class ModelDocumentMutation

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

public class ModelDocumentMutation extends Object
Optional direct current-document consequence of one model target transition.

A null document represents deletion from collection. The runtime attaches the target transition's assigned stateIndex and applies the mutation through a monotone write fence.

  • Field Details

    • PRIVATE_MODEL_DOCUMENT_COLLECTION_PREFIX

      public static final String PRIVATE_MODEL_DOCUMENT_COLLECTION_PREFIX
      Prefix for type-isolated internal Graph-component collections.
      See Also:
    • MIGRATION_COLLECTION

      public static final String MIGRATION_COLLECTION
      Internal collection containing crash-safe direct-document state while published legacy events are being rebuilt. Ordinary Model loads and searches never use this collection.
      See Also:
  • Constructor Details

    • ModelDocumentMutation

      public ModelDocumentMutation()
  • Method Details

    • privateModelDocumentCollection

      public static String privateModelDocumentCollection(String modelType)
      Returns the private search collection for current documents of one Model type.

      Type isolation lets direct lookup, relationship search and Graph composition use ordinary document indexes without scanning or mixing unrelated Model types. The logical Model name is already part of the persisted contract and keeps the collection deterministic across SDK instances and Java class/package renames.

    • getBytes

      public long getBytes()
      Returns the serialized document payload size without counting protocol framing.