int numExtraLiveDocs = 0; while (iterator.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { if (cloneLiveDocs.getAndSet(iterator.docID()) == false) {
public void set(int index) { assert 0 <= index && index < this.length(); assert bitset == null || onBits < bitset.length() : "Bitset should be released when all bits are set"; // Ignore set when bitset is full. if (bitset != null) { final boolean wasOn = bitset.getAndSet(index); if (wasOn == false) { onBits++; // Once all bits are set, we can simply just return YES for all indexes. // This allows us to clear the internal bitset and use null check as the guard. if (onBits == bitset.length()) { bitset = null; } } } }
public void set(int index) { assert 0 <= index && index < this.length(); assert bitset == null || onBits < bitset.length() : "Bitset should be released when all bits are set"; // Ignore set when bitset is full. if (bitset != null) { final boolean wasOn = bitset.getAndSet(index); if (wasOn == false) { onBits++; // Once all bits are set, we can simply just return YES for all indexes. // This allows us to clear the internal bitset and use null check as the guard. if (onBits == bitset.length()) { bitset = null; } } } }
public void set(int index) { assert 0 <= index && index < this.length(); assert bitset == null || onBits < bitset.length() : "Bitset should be released when all bits are set"; // Ignore set when bitset is full. if (bitset != null) { final boolean wasOn = bitset.getAndSet(index); if (wasOn == false) { onBits++; // Once all bits are set, we can simply just return YES for all indexes. // This allows us to clear the internal bitset and use null check as the guard. if (onBits == bitset.length()) { bitset = null; } } } }
int numExtraLiveDocs = 0; while (iterator.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { if (cloneLiveDocs.getAndSet(iterator.docID()) == false) {