public void addIndexEntry(final OIndex<?> delegate, final String iIndexName, final OTransactionIndexChanges.OPERATION iOperation,
      final Object key, final OIdentifiable iValue, boolean clientTrackOnly) {
    OTransactionIndexChanges indexEntry = indexEntries.get(iIndexName);
    if (indexEntry == null) {
      indexEntry = new OTransactionIndexChanges();
      indexEntries.put(iIndexName, indexEntry);
    }

    if (iOperation == OPERATION.CLEAR)
      indexEntry.setCleared();
    else {
      OTransactionIndexChangesPerKey changes = indexEntry.getChangesPerKey(key);
      changes.clientTrackOnly = clientTrackOnly;
      changes.add(iValue, iOperation);

      if (iValue == null)
        return;

      List<OTransactionRecordIndexOperation> transactionIndexOperations = recordIndexOperations.get(iValue.getIdentity());

      if (transactionIndexOperations == null) {
        transactionIndexOperations = new ArrayList<OTransactionRecordIndexOperation>();
        recordIndexOperations.put(iValue.getIdentity().copy(), transactionIndexOperations);
      }

      transactionIndexOperations.add(new OTransactionRecordIndexOperation(iIndexName, key, iOperation));
    }
  }
public void addIndexEntry ( final OIndex < ? > delegate , final String iIndexName , final OTransactionIndexChanges . OPERATION iOperation , final Object key , final OIdentifiable iValue , boolean clientTrackOnly ) { OTransactionIndexChanges indexEntry = indexEntries . get ( iIndexName ) ; if ( indexEntry == null ) { indexEntry = new OTransactionIndexChanges ( ) ; indexEntries . put ( iIndexName , indexEntry ) ; } if ( iOperation == OPERATION . CLEAR ) indexEntry . setCleared ( ) ; else { OTransactionIndexChangesPerKey changes = indexEntry . getChangesPerKey ( key ) ; changes . clientTrackOnly = clientTrackOnly ; changes . add ( iValue , iOperation ) ; if ( iValue == null ) return ; List < OTransactionRecordIndexOperation > transactionIndexOperations = recordIndexOperations . get ( iValue . getIdentity ( ) ) ; if ( transactionIndexOperations == null ) { transactionIndexOperations = new ArrayList < OTransactionRecordIndexOperation > ( ) ; recordIndexOperations . put ( iValue . getIdentity ( ) . copy ( ) , transactionIndexOperations ) ; } transactionIndexOperations . add ( new OTransactionRecordIndexOperation ( iIndexName , key , iOperation ) ) ; } }
Bufferizes index changes to be flushed at commit time.