]
Nistor Adrian updated IPROTO-152:
---------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
Split SerializationContextInitializer into 2 separate interfaces, one
to register schemas+marshallers and one to provide access to the generated schema
-------------------------------------------------------------------------------------------------------------------------------------------------------
Key: IPROTO-152
URL:
https://issues.redhat.com/browse/IPROTO-152
Project: Infinispan ProtoStream
Issue Type: Enhancement
Affects Versions: 4.3.3.Final
Reporter: Nistor Adrian
Assignee: Nistor Adrian
Priority: Major
Fix For: 4.4.0.Alpha1, 4.3.4.Final
We need a way to support generating marshallers without always generating a schema.
For that we can introduce a new flag in AutoProtoSchemaBuilder , marshallersOnly (default
false), that will cause schema generation and registration to be skipped.
But the current form of SerializationContextInitializer interface mixes up access to the
name and contents of the generated schema and the registration of generated marshallers
and schemas, and if marshallersOnly=true it's unclear what getProtoFileName() and
getProtoFile() should return.
To fix that we should move methods getProtoFileName() and getProtoFile() to a
sub-interface called GeneratedSchema. All generated SerializationContextInitializer
implementations will implement this interface, unless marshallersOnly=true, in which case
they will implement SerializationContextInitializer only.
The methods will not be really moved right now, they will be temporarily kept in
SerializationContextInitializer also and will only be removed for good in version 5.
{color:#00627a} {color}