| | |
| | | */ |
| | | private boolean trusted; |
| | | |
| | | private final ImportIDSet newImportIDSet; |
| | | |
| | | /** |
| | | * Create a new index object. |
| | | * @param name The name of the index database within the entryContainer. |
| | |
| | | this.indexEntryLimit = indexEntryLimit; |
| | | this.cursorEntryLimit = cursorEntryLimit; |
| | | this.maintainCount = maintainCount; |
| | | this.newImportIDSet = new ImportIDSet(null, indexEntryLimit, indexEntryLimit, maintainCount); |
| | | |
| | | this.state = state; |
| | | this.trusted = state.getIndexTrustState(txn, this); |
| | |
| | | ByteSequence key = importIdSet.getKey(); |
| | | ByteString value = txn.read(getName(), key); |
| | | if (value != null) { |
| | | newImportIDSet.clear(); |
| | | newImportIDSet.remove(value, importIdSet); |
| | | if (newImportIDSet.isDefined() && newImportIDSet.size() == 0) |
| | | final ImportIDSet importIDSet = new ImportIDSet(key, newSetFromBytes(key, value), indexEntryLimit, maintainCount); |
| | | importIDSet.remove(importIdSet); |
| | | if (importIDSet.isDefined() && importIDSet.size() == 0) |
| | | { |
| | | txn.delete(getName(), key); |
| | | } |
| | | else |
| | | { |
| | | value = newImportIDSet.valueToByteString(); |
| | | value = importIDSet.valueToByteString(); |
| | | txn.create(getName(), key, value); |
| | | } |
| | | } else { |
| | |
| | | ByteSequence key = importIdSet.getKey(); |
| | | ByteString value = txn.read(getName(), key); |
| | | if(value != null) { |
| | | newImportIDSet.clear(); |
| | | if (newImportIDSet.merge(value, importIdSet)) { |
| | | final ImportIDSet importIDSet = new ImportIDSet(key, newSetFromBytes(key, value), indexEntryLimit, maintainCount); |
| | | if (importIDSet.merge(importIdSet)) { |
| | | entryLimitExceededCount++; |
| | | } |
| | | value = newImportIDSet.valueToByteString(); |
| | | value = importIDSet.valueToByteString(); |
| | | } else { |
| | | if(!importIdSet.isDefined()) { |
| | | entryLimitExceededCount++; |