code: public void checkExpand(int _hash) {
      int si = _hash & LOCK_MASK;
      long _size = segmentSize[si].get();
      if (_size > segmentMaxFill) {
        eventuallyExpand(si);
      }
    }
docs: Checks whether expansion is needed and expand when {@link #insertWithinLock(Entry, int, int)} is used.
  No lock may be hold when calling this method, since the table must be locked completely using
  the proper lock order.
  
  <p>Need for expansion is only checked by comparing whether the associated segment is
  full. Should be called after insert after giving up the lock.