public IObjectInfo insertEntryIndexedField(TemplateCacheInfo pTemplate,K fieldValue,TypeData pType,boolean alreadyCloned){
  IObjectInfo oi=null;
  IStoredList<TemplateCacheInfo> newSL=null;
  IStoredList<TemplateCacheInfo> currentSL=null;
  boolean first=true;
  _size.incrementAndGet();
  while (true) {
    if (first) {
      first=false;
      currentSL=_orderedStore.get(fieldValue);
    }
    if (currentSL == null) {
      if (!alreadyCloned && _index.considerValueClone()) {
        fieldValue=(K)_index.cloneIndexValue(fieldValue,pTemplate.m_TemplateHolder);
        alreadyCloned=true;
      }
      currentSL=_orderedStore.putIfAbsent(fieldValue,pTemplate);
      if (currentSL == null) {
        oi=pTemplate;
        break;
      }
    }
    if (currentSL.isMultiObjectCollection()) {
      oi=currentSL.add(pTemplate);
      if (oi == null) {
        _orderedStore.remove(fieldValue,currentSL);
        currentSL=null;
        continue;
      }
 else       break;
    }
    if (newSL == null)     newSL=StoredListFactory.createConcurrentList(false,true);
    IObjectInfo otheroi=newSL.addUnlocked(currentSL.getObjectFromHead());
    IObjectInfo myoi=newSL.addUnlocked(pTemplate);
    if (!_orderedStore.replace(fieldValue,currentSL,newSL)) {
      newSL.removeUnlocked(otheroi);
      newSL.removeUnlocked(myoi);
      myoi=null;
      currentSL=null;
    }
 else {
      oi=myoi;
      break;
    }
  }
  return oi;
}

public IObjectInfo insertEntryIndexedField ( TemplateCacheInfo pTemplate , K fieldValue , TypeData pType , boolean alreadyCloned ) { IObjectInfo oi = null ; IStoredList < TemplateCacheInfo > newSL = null ; IStoredList < TemplateCacheInfo > currentSL = null ; boolean first = true ; _size . incrementAndGet ( ) ; while ( true ) { if ( first ) { first = false ; currentSL = _orderedStore . get ( fieldValue ) ; } if ( currentSL == null ) { if ( ! alreadyCloned && _index . considerValueClone ( ) ) { fieldValue = ( K ) _index . cloneIndexValue ( fieldValue , pTemplate . m_TemplateHolder ) ; alreadyCloned = true ; } currentSL = _orderedStore . putIfAbsent ( fieldValue , pTemplate ) ; if ( currentSL == null ) { oi = pTemplate ; break ; } } if ( currentSL . isMultiObjectCollection ( ) ) { oi = currentSL . add ( pTemplate ) ; if ( oi == null ) { _orderedStore . remove ( fieldValue , currentSL ) ; currentSL = null ; continue ; } else break ; } if ( newSL == null ) newSL = StoredListFactory . createConcurrentList ( false , true ) ; IObjectInfo otheroi = newSL . addUnlocked ( currentSL . getObjectFromHead ( ) ) ; IObjectInfo myoi = newSL . addUnlocked ( pTemplate ) ; if ( ! _orderedStore . replace ( fieldValue , currentSL , newSL ) ) { newSL . removeUnlocked ( otheroi ) ; newSL . removeUnlocked ( myoi ) ; myoi = null ; currentSL = null ; } else { oi = myoi ; break ; } } return oi ; }
insert a value for this key - if key already exist insert into the sl of same values
