本文整理汇总了Java中org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty.getValueAsInt方法的典型用法代码示例。如果您正苦于以下问题:Java InterceptorProperty.getValueAsInt方法的具体用法?Java InterceptorProperty.getValueAsInt怎么用?Java InterceptorProperty.getValueAsInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty
的用法示例。
在下文中一共展示了InterceptorProperty.getValueAsInt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setProperties
import org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty; //导入方法依赖的package包/类
@Override
public void setProperties(Map<String, InterceptorProperty> properties) {
super.setProperties(properties);
InterceptorProperty p = properties.get("prepared");
if (p!=null) cachePrepared = p.getValueAsBoolean(cachePrepared);
p = properties.get("callable");
if (p!=null) cacheCallable = p.getValueAsBoolean(cacheCallable);
p = properties.get("max");
if (p!=null) maxCacheSize = p.getValueAsInt(maxCacheSize);
if (cachePrepared && cacheCallable) {
this.types = ALL_TYPES;
} else if (cachePrepared) {
this.types = PREPARED_TYPE;
} else if (cacheCallable) {
this.types = CALLABLE_TYPE;
} else {
this.types = NO_TYPE;
}
}
示例2: setProperties
import org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty; //导入方法依赖的package包/类
@Override
public void setProperties(Map<String,InterceptorProperty> properties) {
super.setProperties(properties);
InterceptorProperty p = properties.get("queryTimeout");
if (p!=null) timeout = p.getValueAsInt(timeout);
}