You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2009/09/02 20:14:32 UTC
[jira] Resolved: (AVRO-110) make GenericData, & ReflectData
implement singleton pattern
[ https://issues.apache.org/jira/browse/AVRO-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting resolved AVRO-110.
-------------------------------
Resolution: Fixed
Fix Version/s: 1.1.0
I just committed this.
> 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
> Fix For: 1.1.0
>
> Attachments: AVRO-104.patch
>
>
> 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.