public LocalQueryFunction setOptimizeForWrite(final boolean optimizeForWrite) {
      this.optimizeForWrite = optimizeForWrite;
      return this;
    }
Function to gather data locally. This function is required to execute query with region context
geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java