You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeff Hodges (JIRA)" <ji...@apache.org> on 2010/01/13 06:43:54 UTC

[jira] Updated: (CASSANDRA-693) MessagingService really doesn't need an instance method

     [ https://issues.apache.org/jira/browse/CASSANDRA-693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hodges updated CASSANDRA-693:
----------------------------------

    Attachment: messaging_service_property.patch

Here's a swing at removing the weirdo lock.

> MessagingService really doesn't need an instance method
> -------------------------------------------------------
>
>                 Key: CASSANDRA-693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-693
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jeff Hodges
>            Priority: Minor
>         Attachments: messaging_service_property.patch
>
>
> MessagingService.instance() is only used to get the perf gain from not allocating a new object everytime we send a message or get a verb handler. There is no instance data munged during it's existence and the way even the one instance is used currently is not thread-safe. It's basically a singleton with a weirdo lock around it's creation.
> It seems kind of silly to have all the mental overhead of Yet Another Not-Constructor Constructor. We could do many things instead. One idea is to just make MessagingService.instance a public property of it and be done with the whole thing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.