incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eben Hewitt <eben.hew...@gmail.com>
Subject AntiEntropyService Singleton
Date Sat, 08 May 2010 16:37:26 GMT
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