incubator-jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Allen (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (JENA-237) Quad is mutable
Date Tue, 17 Apr 2012 01:50:16 GMT


Stephen Allen resolved JENA-237.

    Resolution: Fixed

Looked at all the places calling this method, and didn't see any problems with the proposed
change, so I committed it in revision 1326875.
> Quad is mutable
> ---------------
>                 Key: JENA-237
>                 URL:
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ
>            Reporter: Stephen Allen
>            Assignee: Stephen Allen
>            Priority: Minor
>         Attachments: JENA-237 - Immutable Quad.patch
> I notice that Quad is a mutable object, specifically it lazily caches the call of asTriple().
 It seems that we can eliminate this caching and make Quad an immutable object.
> Benefits:
>   - It's really cheap to create a new Triple object on each call to asTriple()
>   - Reduce the memory footprint of Quad objects by eliminating at least a pointer, and
potentially a pointer and a whole Triple object
>   - Makes Quad thread-safe
> I didn't just make the change because I didn't know if there was a reason for the current
situation.  Attached patch.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message