private void flushEntries(Collection<IndexData[]> allIndexes) { for (IndexData[] indexes : allIndexes) { for (IndexData indexData : indexes) { SortedIndexContainer index = indexData.index; THashMapWithCreate entryIdsPerIndexKey = indexData.indexEntryMap; if (entryIdsPerIndexKey != null && entryIdsPerIndexKey.size() > 0) { writeIRFRecords(index, entryIdsPerIndexKey, dos); entryIdsPerIndexKey.clear(); } } } }
/** * NOT THREAD-SAFE; ONLY FOR TESTS */ @SuppressWarnings("unchecked") public final Set<Object> getEntryKeys() { final THashSet keys = new THashSet(this.entryMods.size()); this.entryMods.forEachKey(new TObjectProcedure() { public final boolean execute(final Object obj) { if (obj instanceof RegionEntry) { keys.add(((RegionEntry)obj).getKeyCopy()); } else { keys.add(obj); } return true; } }); return keys; }
/** * NOT THREAD-SAFE. * This is called in case of hdfs enabled table to get newly * created entries in this tx. * As the iterator is on queue, this entry is not in the queue+hdfs. */ @SuppressWarnings("unchecked") public final Set<Object> getCreatedEntryKeys() { final THashSet keys = new THashSet(this.entryMods.size()); this.entryMods.forEachValue(new TObjectProcedure() { public final boolean execute(final Object obj) { if(obj instanceof TXEntryState) { if(((TXEntryState)obj).wasCreatedByTX()) { keys.add(((TXEntryState)obj).getUnderlyingRegionEntry()); } } return true; } }); return keys; }
if (!checkValid || this.isValid) { final THashMapWithCreate entryMap = this.entryMods; final Object txEntry = entryMap.size() > 0 ? entryMap.get(entryKey) : null; if (TXStateProxy.LOG_FINEST) {
else if (this.entryMods.size() > 0) {