cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Hodges (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-693) MessagingService really doesn't need an instance method
Date Wed, 13 Jan 2010 05:43:54 GMT

     [ 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.


Mime
View raw message