public Integer getMemorySizeMb() {
      if (type == EvictionType.MEMORY_SIZE) {
        return limit;
      }
      return null;
    }
this sets the entry count and the eviction type to ENTRY_COUNT

@param entryCount the entry count
@throws IllegalArgumentException if type is already set to another value. This is to prevent
        users from trying to send conflicting json attributes
        such as {type:HEAP_PERCENTAGE,entryCount:10}
geode-management/src/main/java/org/apache/geode/management/configuration/Region.java