public static function setAutoFlushEntries($entries) {
    if (!is_int($entries)) {
      throw new \InvalidArgumentException(
          'Entries must be an integer but was ' . self::typeOrClass($entries));
    }
    self::$auto_flush_entries = $entries;
  }