setAttribute(model, MAX_POOL_SIZE, pool.getMaxPoolSize()); setAttribute(model, MIN_POOL_SIZE, pool.getMinPoolSize()); setAttribute(model, INITIAL_POOL_SIZE, pool.getInitialPoolSize()); if (pool.getCapacity() != null) { if (pool.getCapacity().getIncrementer() != null) { setAttribute(model, CAPACITY_INCREMENTER_CLASS, pool.getCapacity().getIncrementer().getClassName()); if (pool.getCapacity().getIncrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getIncrementer().getConfigPropertiesMap().entrySet()) { model.get(CAPACITY_INCREMENTER_PROPERTIES.getName(), config.getKey()).set(config.getValue()); if (pool.getCapacity().getDecrementer() != null) { setAttribute(model, CAPACITY_DECREMENTER_CLASS, pool.getCapacity().getDecrementer().getClassName()); if (pool.getCapacity().getDecrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getDecrementer().getConfigPropertiesMap().entrySet()) { model.get(CAPACITY_DECREMENTER_PROPERTIES.getName(), config.getKey()).set(config.getValue()); setAttribute(model, POOL_USE_STRICT_MIN, pool.isUseStrictMin()); if (pool.getFlushStrategy() != null) setAttribute(model, POOL_FLUSH_STRATEGY, pool.getFlushStrategy().name()); setAttribute(model, POOL_PREFILL, pool.isPrefill()); setAttribute(model, POOL_FAIR, pool.isFair());
if (pool == null || pool.getCapacity() == null || pool.getCapacity().getIncrementer() == null) return; final Map<String, String> propertiesMap = pool.getCapacity().getIncrementer().getConfigPropertiesMap(); if (propertiesMap == null) { return; if (pool == null || pool.getCapacity() == null || pool.getCapacity().getDecrementer() == null) return; final Map<String, String> propertiesMap = pool.getCapacity().getDecrementer().getConfigPropertiesMap(); if (propertiesMap == null) { return;
if (pool == null || pool.getCapacity() == null || pool.getCapacity().getIncrementer() == null) return; final Map<String, String> propertiesMap = pool.getCapacity().getIncrementer().getConfigPropertiesMap(); if (propertiesMap == null) { return; if (pool == null || pool.getCapacity() == null || pool.getCapacity().getDecrementer() == null) return; final Map<String, String> propertiesMap = pool.getCapacity().getDecrementer().getConfigPropertiesMap(); if (propertiesMap == null) { return;
setAttribute(model, MAX_POOL_SIZE, pool.getMaxPoolSize()); setAttribute(model, MIN_POOL_SIZE, pool.getMinPoolSize()); setAttribute(model, INITIAL_POOL_SIZE, pool.getInitialPoolSize()); if (pool.getCapacity() != null) { if (pool.getCapacity().getIncrementer() != null) { setAttribute(model, CAPACITY_INCREMENTER_CLASS, pool.getCapacity().getIncrementer().getClassName()); if (pool.getCapacity().getIncrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getIncrementer().getConfigPropertiesMap().entrySet()) { model.get(CAPACITY_INCREMENTER_PROPERTIES.getName(), config.getKey()).set(config.getValue()); if (pool.getCapacity().getDecrementer() != null) { setAttribute(model, CAPACITY_DECREMENTER_CLASS, pool.getCapacity().getDecrementer().getClassName()); if (pool.getCapacity().getDecrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getDecrementer().getConfigPropertiesMap().entrySet()) { model.get(CAPACITY_DECREMENTER_PROPERTIES.getName(), config.getKey()).set(config.getValue()); setAttribute(model, POOL_USE_STRICT_MIN, pool.isUseStrictMin()); if (pool.getFlushStrategy() != null) setAttribute(model, POOL_FLUSH_STRATEGY, pool.getFlushStrategy().name()); setAttribute(model, POOL_PREFILL, pool.isPrefill()); setAttribute(model, POOL_FAIR, pool.isFair());