code: public CacheConfigurationBuilder<K, V> withSizeOfMaxObjectSize(long size, MemoryUnit unit) {
      return mapServiceConfiguration(DefaultSizeOfEngineConfiguration.class, existing -> ofNullable(existing)
        .map(e -> new DefaultSizeOfEngineConfiguration(size, unit, e.getMaxObjectGraphSize()))
        .orElse(new DefaultSizeOfEngineConfiguration(size, unit, DEFAULT_OBJECT_GRAPH_SIZE)));
    }
docs: Adds or updates the {@link DefaultSizeOfEngineConfiguration} with the specified maximum mapping size to the configured
  builder.
  <p>
  {@link SizeOfEngine} is what enables the heap tier to be sized in {@link MemoryUnit}.
  
  @param size the maximum mapping size
  @param unit the memory unit
  @return a new builder with the added / updated configuration