private void setPos(int pos) {
      prevPos = this.pos;
      this.pos = pos;
    }
Before inserting we can ensure we have capacity
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndexSet.java