void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") boolean add(long item, long hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity);
@SuppressWarnings("NonAtomicVolatileUpdate") boolean add(long item, long hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity);
@SuppressWarnings("NonAtomicVolatileUpdate") boolean add(long item, long hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity);
@SuppressWarnings("NonAtomicVolatileUpdate") boolean add(long item, long hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity);
@SuppressWarnings("NonAtomicVolatileUpdate") boolean add(long item, long hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity);
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }
void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
void clear() { long stamp = writeLock(); try { Arrays.fill(table, EmptyItem); this.size = 0; this.usedBuckets = 0; } finally { unlockWrite(stamp); } }
@SuppressWarnings("NonAtomicVolatileUpdate") boolean add(long item, long hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity);
@SuppressWarnings("NonAtomicVolatileUpdate") private boolean remove(long item, int hash) { long stamp = writeLock(); int bucket = signSafeMod(hash, capacity); try { while (true) { long storedItem = table[bucket]; if (item == storedItem) { --size; cleanBucket(bucket); return true; } else if (storedItem == EmptyItem) { // Key wasn't found return false; } bucket = (bucket + 1) & (table.length - 1); } } finally { unlockWrite(stamp); } }