for (int i = 0; i < indexingRecords.size(); i++) {
IndexingRecord record = indexingRecords.elementAt(i);
ByteBuffer currentValue = record.getPersistedDataBuffer();
JODBIndexingAgent indexingAgent = record.getIndexingAgent();
if (currentValue.limit() != 0 && !indexingAgent.removeIndex(offsetId, currentValue, null)) {
throw new JodbIOException("Illegal index state: can't remove index");
}
ByteBuffer pendingValue = record.getPendingDataBuffer();
if (pendingValue.limit() == 0) {
throw new JodbIOException(
"indexing value unavailable for " + offsetId);
}
indexingAgent.insertIndex(offsetId, pendingValue, context);
if(!_agentsTransactionObjects.containsKey(indexingAgent)){
try {
set(indexingAgent, Integer.MAX_VALUE);
} catch (Exception e) {
throw new JodbIOException(e);
}
}
}
}
}