public RegionAttributesType.EvictionAttributes convertToConfigEvictionAttributes() {
    RegionAttributesType.EvictionAttributes configAttributes =
        new RegionAttributesType.EvictionAttributes();
    EnumActionDestroyOverflow action = EnumActionDestroyOverflow.fromValue(getAction()
        .toString());
    EvictionAlgorithm algorithm = getAlgorithm();
    Optional<String> objectSizerClass = Optional.ofNullable(getObjectSizer())
        .map(c -> c.getClass().toString());
    String maximum = Integer.toString(getMaximum());

    if (algorithm.isLRUHeap()) {
      RegionAttributesType.EvictionAttributes.LruHeapPercentage heapPercentage =
          new RegionAttributesType.EvictionAttributes.LruHeapPercentage();
      heapPercentage.setAction(action);
      objectSizerClass.ifPresent(heapPercentage::setClassName);
      configAttributes.setLruHeapPercentage(heapPercentage);
    } else if (algorithm.isLRUMemory()) {
      RegionAttributesType.EvictionAttributes.LruMemorySize memorySize =
          new RegionAttributesType.EvictionAttributes.LruMemorySize();
      memorySize.setAction(action);
      objectSizerClass.ifPresent(memorySize::setClassName);
      memorySize.setMaximum(maximum);
      configAttributes.setLruMemorySize(memorySize);
    } else {
      RegionAttributesType.EvictionAttributes.LruEntryCount entryCount =
          new RegionAttributesType.EvictionAttributes.LruEntryCount();
      entryCount.setAction(action);
      entryCount.setMaximum(maximum);
      configAttributes.setLruEntryCount(entryCount);
    }

    return configAttributes;
  }
@param maximumMegabytes the maximum allowed bytes in the Region
@param evictionAction the action to perform when evicting an entry
@return an EvictionAttributes for the MemLIFOCapacityController
@since GemFire 5.7
@deprecated For internal use only.
geode-core/src/main/java/org/apache/geode/cache/EvictionAttributes.java