public static EvictionAttributesImpl fromConfig(
      RegionAttributesType.EvictionAttributes configAttributes)
      throws ClassCastException, InstantiationException,
      IllegalAccessException {
    EvictionAttributesImpl evictionAttributes = new EvictionAttributesImpl();

    if (configAttributes.getLruHeapPercentage() != null) {
      evictionAttributes.setAlgorithm(EvictionAlgorithm.LRU_HEAP);
    } else if (configAttributes.getLruEntryCount() != null) {
      evictionAttributes.setAlgorithm(EvictionAlgorithm.LRU_ENTRY);
    } else if (configAttributes.getLruMemorySize() != null) {
      evictionAttributes.setAlgorithm(EvictionAlgorithm.LRU_MEMORY);
    } else {
      evictionAttributes.setAlgorithm(EvictionAlgorithm.NONE);
    }

    String sizerClassName = null;
    if (configAttributes.getLruHeapPercentage() != null) {
      sizerClassName = configAttributes.getLruHeapPercentage().getClassName();
    } else if (configAttributes.getLruMemorySize() != null) {
      sizerClassName = configAttributes.getLruMemorySize().getClassName();
    }

    if (sizerClassName != null) {
      ObjectSizer sizer;
      try {
        sizer = (ObjectSizer) ClassPathLoader.getLatest().forName(sizerClassName).newInstance();
      } catch (ClassNotFoundException e) {
        sizer = ObjectSizer.DEFAULT;
      }
      if (sizer != null && !(sizer instanceof Declarable)) {
        throw new ClassCastException();
      }
      evictionAttributes.setObjectSizer(sizer);
    }

    if (configAttributes.getLruMemorySize() != null) {
      evictionAttributes
          .setMaximum(Integer.parseInt(configAttributes.getLruMemorySize().getMaximum()));
    } else if (configAttributes.getLruEntryCount() != null) {
      evictionAttributes
          .setMaximum(Integer.parseInt(configAttributes.getLruEntryCount().getMaximum()));
    } else {
      evictionAttributes.setMaximum(0);
    }

    if (configAttributes.getLruMemorySize() != null) {
      evictionAttributes
          .setAction(EvictionAction.parseAction(configAttributes.getLruMemorySize().getAction()
              .value()));
    } else if (configAttributes.getLruEntryCount() != null) {
      evictionAttributes
          .setAction(EvictionAction.parseAction(configAttributes.getLruEntryCount().getAction()
              .value()));
    } else if (configAttributes.getLruHeapPercentage() != null) {
      evictionAttributes
          .setAction(EvictionAction.parseAction(configAttributes.getLruHeapPercentage().getAction()
              .value()));
    } else {
      evictionAttributes.setAction(EvictionAction.NONE);
    }

    return evictionAttributes;
  }
Returns true if this object uses a LIFO algorithm

@since GemFire 5.7
geode-core/src/main/java/org/apache/geode/internal/cache/EvictionAttributesImpl.java