public void setMemorySizeMb(Integer memorySizeMb) {
      if (type != null && type != EvictionType.MEMORY_SIZE) {
        throw new IllegalArgumentException("Type conflict. type is already set to " + type);
      }
      type = EvictionType.MEMORY_SIZE;
      limit = memorySizeMb;
    }
this sets the memory size in megabytes and the eviction type to MEMORY_SIZE

@param memorySizeMb the memory size in megabytes
@throws IllegalArgumentException if type is already set to other values. This is to prevent
        users from trying to send conflicting json attributes
        such as {type:HEAP_PERCENTAGE,memorySizeMb:100}
geode-management/src/main/java/org/apache/geode/management/configuration/Region.java