@Nullable public GridCacheMvccCandidate addEntry(GridDhtCacheEntry entry) throws GridCacheEntryRemovedException, GridDistributedLockCancelledException {
  if (log.isDebugEnabled())   log.debug("Adding entry: " + entry);
  if (entry == null)   return null;
  if (timedOut)   return null;
  GridCacheMvccCandidate c=entry.addDhtLocal(nearNodeId,nearLockVer,topVer,threadId,lockVer,null,null,timeout,false,inTx(),implicitSingle());
  if (c == null && timeout < 0) {
    if (log.isDebugEnabled())     log.debug("Failed to acquire lock with negative timeout: " + entry);
    onFailed(false);
    return null;
  }
synchronized (sync) {
    entries.add(c == null || c.reentry() ? null : entry);
    if (c != null && !c.reentry())     pendingLocks.add(entry.key());
  }
  if (timedOut) {
    entry.removeLock(lockVer);
    return null;
  }
  return c;
}

@ Nullable public GridCacheMvccCandidate addEntry ( GridDhtCacheEntry entry ) throws GridCacheEntryRemovedException , GridDistributedLockCancelledException { if ( log . isDebugEnabled ( ) ) log . debug ( "Adding entry: " + entry ) ; if ( entry == null ) return null ; if ( timedOut ) return null ; GridCacheMvccCandidate c = entry . addDhtLocal ( nearNodeId , nearLockVer , topVer , threadId , lockVer , null , null , timeout , false , inTx ( ) , implicitSingle ( ) ) ; if ( c == null && timeout < 0 ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Failed to acquire lock with negative timeout: " + entry ) ; onFailed ( false ) ; return null ; } synchronized ( sync ) { entries . add ( c == null || c . reentry ( ) ? null : entry ) ; if ( c != null && ! c . reentry ( ) ) pendingLocks . add ( entry . key ( ) ) ; } if ( timedOut ) { entry . removeLock ( lockVer ) ; return null ; } return c ; }
adds entry to future .
