public void setEntryCount(Integer entryCount) {
      if (type != null && type != EvictionType.ENTRY_COUNT) {
        throw new IllegalArgumentException("Type conflict. Type is already set to " + type);
      }
      type = EvictionType.ENTRY_COUNT;
      limit = entryCount;
    }
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