private void collectPendingVersions(GridDhtTxLocal dhtTxLoc){
  if (dhtTxLoc.needsCompletedVersions()) {
    if (log.isDebugEnabled())     log.debug("Checking for pending locks with version less then tx version: " + dhtTxLoc);
    Set<GridCacheVersion> vers=new LinkedHashSet<>();
    collectPendingVersions(dhtTxLoc.readEntries(),dhtTxLoc.xidVersion(),vers);
    collectPendingVersions(dhtTxLoc.writeEntries(),dhtTxLoc.xidVersion(),vers);
    if (!vers.isEmpty())     dhtTxLoc.pendingVersions(vers);
  }
}

private void collectPendingVersions ( GridDhtTxLocal dhtTxLoc ) { if ( dhtTxLoc . needsCompletedVersions ( ) ) { if ( log . isDebugEnabled ( ) ) log . debug ( "Checking for pending locks with version less then tx version: " + dhtTxLoc ) ; Set < GridCacheVersion > vers = new LinkedHashSet < > ( ) ; collectPendingVersions ( dhtTxLoc . readEntries ( ) , dhtTxLoc . xidVersion ( ) , vers ) ; collectPendingVersions ( dhtTxLoc . writeEntries ( ) , dhtTxLoc . xidVersion ( ) , vers ) ; if ( ! vers . isEmpty ( ) ) dhtTxLoc . pendingVersions ( vers ) ; } }
collects versions for all pending locks for all entries within transaction
