void checkLocks(){
  if (!isDone()) {
    for (int i=0; i < entries.size(); i++) {
      while (true) {
        GridCacheEntryEx cached=entries.get(i);
        try {
          if (!locked(cached))           return;
          break;
        }
 catch (        GridCacheEntryRemovedException ignore) {
          if (log.isDebugEnabled())           log.debug("Got removed entry in onOwnerChanged method (will retry): " + cached);
          entries.add(i,(GridLocalCacheEntry)cache.entryEx(cached.key()));
        }
      }
    }
    if (log.isDebugEnabled())     log.debug("Local lock acquired for entries: " + entries);
    onComplete(true);
  }
}

void checkLocks ( ) { if ( ! isDone ( ) ) { for ( int i = 0 ; i < entries . size ( ) ; i ++ ) { while ( true ) { GridCacheEntryEx cached = entries . get ( i ) ; try { if ( ! locked ( cached ) ) return ; break ; } catch ( GridCacheEntryRemovedException ignore ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Got removed entry in onOwnerChanged method (will retry): " + cached ) ; entries . add ( i , ( GridLocalCacheEntry ) cache . entryEx ( cached . key ( ) ) ) ; } } } if ( log . isDebugEnabled ( ) ) log . debug ( "Local lock acquired for entries: " + entries ) ; onComplete ( true ) ; } }
explicitly check if lock was acquired .
