@Override
    public Object next() throws NoSuchElementException {
      Object obj = current;
      if (keysToRemove != null) {
        // for Not equals we need to continue looking
        // so increment the index here
        setPos(pos + 1);
      } else {
        // advance the pointer
        setPos((pos + 1) & mask);
      }
      return obj;
    }
Before inserting we can ensure we have capacity
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndexSet.java