Synchronized dialing in apache commons

Why is there an Apache Synchronized Set when we are a Collection SynchronizedSet ?

How much better is it?

+3
source share
2 answers

I assume that it allows you to specify a custom lock object.

The constructor is protected, but you can subclass it and pass a custom lock.

+1
source

It depends on what you want to do. The synchronized Apache suite allows you to get the core suite. This probably ensures consistency. The Collections method is standard.

, Collections.setFromMap(new ConcurrentHashMap()), CopyOnWriteArraySet ConcurrentSkipListSet

+2

All Articles