make GenericData, & ReflectData implement singleton pattern
-----------------------------------------------------------
Key: AVRO-110
URL: https://issues.apache.org/jira/browse/AVRO-110
Project: Avro
Issue Type: Improvement
Components: java
Reporter: Doug Cutting
Assignee: Doug Cutting
Currently GenericData has only static methods. ReflectData used to follow that
pattern, but in AVRO-104 was converted into a normally instantiable class, with
a public constructor.
Better for both would be the singleton pattern. A static get() method would
return the single, statically-allocated instance. Instances could thus
implement long-lived caches (a feature of ReflectData that was lost in
AVRO-104, adversely affecting performance). A protected constructor would be
provided so that singleton subclasses can be implemented that override methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.