private boolean addLocalKey(KeyCacheObject key,AffinityTopologyVersion topVer,Collection<KeyCacheObject> distributedKeys) throws IgniteCheckedException {
  GridDistributedCacheEntry entry=cctx.colocated().entryExx(key,topVer,false);
  assert !entry.detached();
  if (!cctx.isAll(entry,filter)) {
    if (log.isDebugEnabled())     log.debug("Entry being locked did not pass filter (will not lock): " + entry);
    onComplete(false,false);
    return false;
  }
  GridCacheMvccCandidate cand=addEntry(entry);
  if (cand != null && !cand.reentry())   distributedKeys.add(key);
  return inTx() && cand == null;
}

private boolean addLocalKey ( KeyCacheObject key , AffinityTopologyVersion topVer , Collection < KeyCacheObject > distributedKeys ) throws IgniteCheckedException { GridDistributedCacheEntry entry = cctx . colocated ( ) . entryExx ( key , topVer , false ) ; assert ! entry . detached ( ) ; if ( ! cctx . isAll ( entry , filter ) ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Entry being locked did not pass filter (will not lock): " + entry ) ; onComplete ( false , false ) ; return false ; } GridCacheMvccCandidate cand = addEntry ( entry ) ; if ( cand != null && ! cand . reentry ( ) ) distributedKeys . add ( key ) ; return inTx ( ) && cand == null ; }
adds local key future .
