code: private void lockColumn(int col, int rowsToLock) {
          // Put in an entry for all the columns's rows
          for (int row = 0; row < rowsToLock; ++row) {
              Entry e = new Entry(row, col);
              // Spin waiting for the entry to be unlocked
              while (lockedEntries.putIfAbsent(e, new Object()) != null)
                  ;
          }
      }
docs: Locks all the row entries for this column, thereby preventing write or
  read access to the values.  Note that the number of rows to lock
  <b>must</b> be the same value used with {@link #unlockColumn(int,int)},
  otherwise the unlock may potentially unlock matrix entries associated
  with this lock call.
  
  @param col the column to lock
  @param rowsToLock the number of rows to lock.  This value should be the
  number of {@link #rows} at the time of the call.