cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stu Hood" <stu.h...@rackspace.com>
Subject RE: AntiEntropyService Singleton
Date Sat, 08 May 2010 18:25:59 GMT
You're right, it should be private. But... I don't think it is worth opening a ticket for.

-----Original Message-----
From: "Eben Hewitt" <eben.hewitt@gmail.com>
Sent: Saturday, May 8, 2010 11:37am
To: user@cassandra.apache.org
Subject: AntiEntropyService Singleton

Hi Everyone
Thanks for your all of your terrific work. I have a question about
org/apache/cassandra/service/AntiEntropyService.java. It's declared as a
Singleton with this line and comment:

 // singleton enforcement
    public static final AntiEntropyService instance = new
AntiEntropyService();

But the constructor is protected, not private:

 protected AntiEntropyService()
    {
        naturalRepairs = new ConcurrentHashMap<CFPair, Long>();
        trees = new HashMap<CFPair, ExpiringMap<InetAddress, TreePair>>();
    }

Is there a particular special reason for that, since it's not "enforced" as
stated? Or should it just be declared private?

Thanks!
Eben

-- 
"In science there are no 'depths'; there is surface everywhere."
--Rudolph Carnap



Mime
View raw message