Wednesday, 3 August 2016

[Java] How to make Concurrent Hash Set

Upper Java 1.8

java.util.Set< String> concurrentSet = java.util.concurrent.ConcurrentHashMap.newKeySet();

Lower Java 1.8

java.util.Set< String> concurrentSet = java.util.Collections.newSetFromMap( new java.util.concurrent.ConcurrentHashMap< String, Boolean>());

No comments:

Post a Comment