code: public final static void setMaxSelectors(int size) throws IOException {
      synchronized (selectors) {
        if (size < maxSelectors) {
          reduce(size);
        } else if (size > maxSelectors) {
          grow(size);
        }
  
        maxSelectors = size;
      }
    }
docs: Set max selector pool size.
  
  @param size max pool size