Java Code Examples for org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty#getValueAsInt()

The following examples show how to use org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty#getValueAsInt() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Tomcat8-Source-Read   File: StatementCache.java    License: MIT License 6 votes vote down vote up
@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;
    }

}
 
Example 2
Source Project: Tomcat7.0.67   File: StatementCache.java    License: Apache License 2.0 6 votes vote down vote up
@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;
    }

}
 
Example 3
Source Project: tomcatsrc   File: StatementCache.java    License: Apache License 2.0 6 votes vote down vote up
@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;
    }

}
 
Example 4
@Override
public void setProperties(Map<String,InterceptorProperty> properties) {
    super.setProperties(properties);
    InterceptorProperty p = properties.get("queryTimeout");
    if (p!=null) timeout = p.getValueAsInt(timeout);
}
 
Example 5
@Override
public void setProperties(Map<String,InterceptorProperty> properties) {
    super.setProperties(properties);
    InterceptorProperty p = properties.get("queryTimeout");
    if (p!=null) timeout = p.getValueAsInt(timeout);
}
 
Example 6
@Override
public void setProperties(Map<String,InterceptorProperty> properties) {
    super.setProperties(properties);
    InterceptorProperty p = properties.get("queryTimeout");
    if (p!=null) timeout = p.getValueAsInt(timeout);
}