当前位置: 首页>>代码示例>>Java>>正文


Java ObjectPoolConfiguration.setMinIdle方法代码示例

本文整理汇总了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());
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:20,代码来源:ConnPoolConfUtils.java

示例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);
		}
	}
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:43,代码来源:ConnIdConfigurationTransformer.java


注:本文中的org.identityconnectors.common.pooling.ObjectPoolConfiguration.setMinIdle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。