use of eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl in project CzechIdMng by bcvsolutions.
the class ConnIdIcConvertUtil method convertConnIdPoolConfiguration.
public static IcObjectPoolConfiguration convertConnIdPoolConfiguration(ObjectPoolConfiguration pool) {
if (pool == null) {
return null;
}
IcObjectPoolConfigurationImpl dto = new IcObjectPoolConfigurationImpl();
dto.setMaxIdle(pool.getMaxIdle());
dto.setMaxObjects(pool.getMaxObjects());
dto.setMaxWait(pool.getMaxWait());
dto.setMinEvictableIdleTimeMillis(pool.getMinEvictableIdleTimeMillis());
dto.setMinIdle(pool.getMinIdle());
return dto;
}
use of eu.bcvsolutions.idm.ic.impl.IcObjectPoolConfigurationImpl in project CzechIdMng by bcvsolutions.
the class ConnIdIcConvertUtil method convertConnIdConnectorConfiguration.
public static IcConnectorConfiguration convertConnIdConnectorConfiguration(APIConfiguration conf) {
if (conf == null) {
return null;
}
IcConnectorConfigurationImpl dto = new IcConnectorConfigurationImpl();
dto.setConnectorPoolingSupported(conf.isConnectorPoolingSupported());
dto.setProducerBufferSize(conf.getProducerBufferSize());
ConfigurationProperties properties = conf.getConfigurationProperties();
IcConfigurationPropertiesImpl propertiesDto = new IcConfigurationPropertiesImpl();
if (properties != null && properties.getPropertyNames() != null) {
List<String> propertyNames = properties.getPropertyNames();
for (String name : propertyNames) {
ConfigurationProperty property = properties.getProperty(name);
IcConfigurationPropertyImpl propertyDto = (IcConfigurationPropertyImpl) convertConnIdConfigurationProperty(property);
if (propertiesDto != null) {
propertiesDto.getProperties().add(propertyDto);
}
}
}
dto.setConfigurationProperties(propertiesDto);
IcObjectPoolConfigurationImpl connectorPoolConfiguration = (IcObjectPoolConfigurationImpl) convertConnIdPoolConfiguration(conf.getConnectorPoolConfiguration());
dto.setConnectorPoolConfiguration(connectorPoolConfiguration);
return dto;
}
Aggregations