code: @Deprecated
      public NearCacheConfig setMaxSize(int maxSize) {
          checkNotNegative(maxSize, "maxSize cannot be a negative number!");
          this.maxSize = calculateMaxSize(maxSize);
          this.evictionConfig.setSize(this.maxSize);
          this.evictionConfig.setMaximumSizePolicy(ENTRY_COUNT);
          return this;
      }
docs: Sets the maximum size of the Near Cache.
  <p>
  When the maxSize is reached, the Near Cache is evicted based on the policy defined.
  <p>
  Accepts any integer between {@code 0} and {@link Integer#MAX_VALUE}.
  The value {@code 0} means {@link Integer#MAX_VALUE}.
  The default is {@code 0}.
  
  @param maxSize the maximum size of the Near Cache
  @return this Near Cache config instance
  @deprecated since 3.8, please use {@link #setEvictionConfig(EvictionConfig)} and {@link EvictionConfig#setSize(int)}