本文整理汇总了Java中org.identityconnectors.common.pooling.ObjectPoolConfiguration.setMinIdle方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectPoolConfiguration.setMinIdle方法的具体用法?Java ObjectPoolConfiguration.setMinIdle怎么用?Java ObjectPoolConfiguration.setMinIdle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.identityconnectors.common.pooling.ObjectPoolConfiguration
的用法示例。
在下文中一共展示了ObjectPoolConfiguration.setMinIdle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateObjectPoolConfiguration
import org.identityconnectors.common.pooling.ObjectPoolConfiguration; //导入方法依赖的package包/类
public static void updateObjectPoolConfiguration(
final ObjectPoolConfiguration opc, final ConnPoolConf cpc) {
if (cpc.getMaxIdle() != null) {
opc.setMaxIdle(cpc.getMaxIdle());
}
if (cpc.getMaxObjects() != null) {
opc.setMaxObjects(cpc.getMaxObjects());
}
if (cpc.getMaxWait() != null) {
opc.setMaxWait(cpc.getMaxWait());
}
if (cpc.getMinEvictableIdleTimeMillis() != null) {
opc.setMinEvictableIdleTimeMillis(cpc.getMinEvictableIdleTimeMillis());
}
if (cpc.getMinIdle() != null) {
opc.setMinIdle(cpc.getMinIdle());
}
}
示例2: transformConnectorPoolConfiguration
import org.identityconnectors.common.pooling.ObjectPoolConfiguration; //导入方法依赖的package包/类
private void transformConnectorPoolConfiguration(ObjectPoolConfiguration connectorPoolConfiguration,
PrismContainer<?> connectorPoolContainer) throws SchemaException {
if (connectorPoolContainer == null || connectorPoolContainer.getValue() == null) {
return;
}
for (PrismProperty prismProperty : connectorPoolContainer.getValue().getProperties()) {
QName propertyQName = prismProperty.getElementName();
if (propertyQName.getNamespaceURI().equals(SchemaConstants.NS_ICF_CONFIGURATION)) {
String subelementName = propertyQName.getLocalPart();
if (ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_MIN_EVICTABLE_IDLE_TIME_MILLIS
.equals(subelementName)) {
connectorPoolConfiguration.setMinEvictableIdleTimeMillis(parseLong(prismProperty));
} else if (ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_MIN_IDLE
.equals(subelementName)) {
connectorPoolConfiguration.setMinIdle(parseInt(prismProperty));
} else if (ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_MAX_IDLE
.equals(subelementName)) {
connectorPoolConfiguration.setMaxIdle(parseInt(prismProperty));
} else if (ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_MAX_OBJECTS
.equals(subelementName)) {
connectorPoolConfiguration.setMaxObjects(parseInt(prismProperty));
} else if (ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_MAX_WAIT
.equals(subelementName)) {
connectorPoolConfiguration.setMaxWait(parseLong(prismProperty));
} else {
throw new SchemaException(
"Unexpected element "
+ propertyQName
+ " in "
+ ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_XML_ELEMENT_NAME);
}
} else {
throw new SchemaException(
"Unexpected element "
+ propertyQName
+ " in "
+ ConnectorFactoryConnIdImpl.CONNECTOR_SCHEMA_CONNECTOR_POOL_CONFIGURATION_XML_ELEMENT_NAME);
}
}
}