title: Different types of thread-safe Sets in Java
body: <p>There seems to be a lot of different implementations and ways to generate thread-safe Sets in Java.
  Some examples include</p>
  
  <p>1) <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/CopyOnWriteArraySet.html" rel="noreferrer">CopyOnWriteArraySet</a> </p>
  
  <p>2) <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collections.html" rel="noreferrer">Collections.synchronizedSet(Set set)</a></p>
  
  <p>3) <a href="http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ConcurrentSkipListSet.html" rel="noreferrer">ConcurrentSkipListSet</a></p>
  
  <p>4) <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collections.html" rel="noreferrer">Collections.newSetFromMap(new ConcurrentHashMap())</a></p>
  
  <p>5) Other Sets generated in a way similar to (4) </p>
  
  <p>These examples come from <a href="https://dhruba.wordpress.com/2009/08/05/concurrent-set-implementations-in-java-6/" rel="noreferrer">Concurrency Pattern: Concurrent Set implementations in Java 6</a></p>
  
  <p>Could someone please simply explain the differences, advantages, and disadvantage of these examples and others? I'm having trouble understanding and keeping straight everything from the Java Std Docs.</p>