Class DocumentMessageReader
java.lang.Object
io.fluxzero.sdk.persisting.search.DocumentMessageReader
Internal, registration-scoped document reader. Retains the original composition for typed Graph handlers while
preserving the ordinary logical message, handler selection, payload parameters and interceptor input.
The root's upcast payload is reused; descendant paths and revisions always refer to the original composition.
Explicit internal Model-source handlers also require exactly one upcast state; ordinary document streams retain
split/drop semantics. Registrations are reference-counted and removed with their handlers.
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentMessageReader(Supplier<SearchClient> searchClient) Binds live Graph hydration to the owning client and consumer namespace. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisLiveGraph(DeserializingMessage message) Live compositions are observational and must never be persisted as a handler return side effect.read(List<io.fluxzero.common.api.SerializedMessage> messages, String topic, Serializer serializer) Reads a batch; topics without typed Graph handlers retain the original serializer stream.read(List<io.fluxzero.common.api.SerializedMessage> messages, String topic, Serializer serializer, SearchClient client) Reads using the explicit consumer namespace while retaining this reader's registration-scoped definitions.booleanreadsGraphs(String topic) Whether this collection needs the original composition alongside its logical document payload.booleanreadsModelDocuments(String topic) Whether this topic requires a single canonical Model state or the original Graph representation.io.fluxzero.common.RegistrationRecords accepted typed Graph and Model-source methods until the returned registration is cancelled.io.fluxzero.common.Registrationregister(Object target, io.fluxzero.common.handling.HandlerFilter filter, ModelRepository repository) Registers durable notifications in the same namespace as the document consumer.
-
Constructor Details
-
DocumentMessageReader
public DocumentMessageReader() -
DocumentMessageReader
Binds live Graph hydration to the owning client and consumer namespace.
-
-
Method Details
-
register
public io.fluxzero.common.Registration register(Object target, io.fluxzero.common.handling.HandlerFilter filter) Records accepted typed Graph and Model-source methods until the returned registration is cancelled. -
register
public io.fluxzero.common.Registration register(Object target, io.fluxzero.common.handling.HandlerFilter filter, ModelRepository repository) Registers durable notifications in the same namespace as the document consumer. -
readsGraphs
Whether this collection needs the original composition alongside its logical document payload. -
readsModelDocuments
Whether this topic requires a single canonical Model state or the original Graph representation. -
read
public Stream<DeserializingMessage> read(List<io.fluxzero.common.api.SerializedMessage> messages, String topic, Serializer serializer) Reads a batch; topics without typed Graph handlers retain the original serializer stream. -
read
public Stream<DeserializingMessage> read(List<io.fluxzero.common.api.SerializedMessage> messages, String topic, Serializer serializer, SearchClient client) Reads using the explicit consumer namespace while retaining this reader's registration-scoped definitions. -
isLiveGraph
Live compositions are observational and must never be persisted as a handler return side effect.
-