List of usage examples for java.util.concurrent.atomic AtomicMarkableReference AtomicMarkableReference
public AtomicMarkableReference(V initialRef, boolean initialMark)
From source file:RefinableHashSet.java
/** * Concurrent Cuckoo hash set. Resizes lock array. * @param capacity Initial number of buckets. *///from ww w.j a va2 s . c o m public RefinableHashSet(int capacity) { super(capacity); locks = new ReentrantLock[capacity]; for (int j = 0; j < capacity; j++) { locks[j] = new ReentrantLock(); } owner = new AtomicMarkableReference<Thread>(null, false); }