Examples of InterceptorProperty


Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

   
    @Override
    public void setProperties(Map<String, InterceptorProperty> properties) {
        super.setProperties(properties);
        final String threshold = "notifyPool";
        InterceptorProperty p1 = properties.get(threshold);
        if (p1!=null) {
            this.setNotifyPool(Boolean.parseBoolean(p1.getValue()));
        }
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

    @Override
    public void setProperties(Map<String, InterceptorProperty> properties) {
        super.setProperties(properties);
        final String threshold = "threshold";
        final String maxqueries= "maxQueries";
        InterceptorProperty p1 = properties.get(threshold);
        InterceptorProperty p2 = properties.get(maxqueries);
        if (p1!=null) {
            setThreshold(Long.parseLong(p1.getValue()));
        }
        if (p2!=null) {
            setMaxQueries(Integer.parseInt(p2.getValue()));
        }
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

     * @param properties
     */
    public void setProperties(Map<String,InterceptorProperty> properties) {
        this.properties = properties;
        final String useEquals = "useEquals";
        InterceptorProperty p = properties.get(useEquals);
        if (p!=null) {
            setUseEquals(Boolean.parseBoolean(p.getValue()));
        }
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

    }

    @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) {
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

     */
    @Override
    public synchronized void setProperties(
            final Map<String, PoolProperties.InterceptorProperty> properties) {
        super.setProperties(properties);
        InterceptorProperty hostnameProp = properties.get("hostname");
        if (hostnameProp == null) {
            throw new IllegalArgumentException(
                    "property \"hostname\" has not been set");
        }
        InterceptorProperty portProp = properties.get("port");
        if (portProp == null) {
            throw new IllegalArgumentException(
                    "property \"port\" has not been set");
        }
        InterceptorProperty sampleRateProp = properties.get("sampleRate");
        if (sampleRateProp == null) {
            throw new IllegalArgumentException(
                    "property \"sampleRate\" has not been set");
        }
        InterceptorProperty prefixProp = properties.get("prefix");
        if (prefixProp == null) {
            throw new IllegalArgumentException(
                    "property \"prefix\" has not been set");
        }

        sampleRate = sampleRateProp.getValueAsDouble(1.0);
        metrics = new Metrics(hostnameProp.getValue(),
                portProp.getValueAsInt(0), prefixProp.getValue(), sampleRate);
        proxyFactory = new ProxyFactory(metrics);
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

     */
    @Override
    public synchronized void setProperties(
            final Map<String, PoolProperties.InterceptorProperty> properties) {
        super.setProperties(properties);
        InterceptorProperty hostnameProp = properties.get("hostname");
        if (hostnameProp == null) {
            throw new IllegalArgumentException(
                    "property \"hostname\" has not been set");
        }
        InterceptorProperty portProp = properties.get("port");
        if (portProp == null) {
            throw new IllegalArgumentException(
                    "property \"port\" has not been set");
        }
        InterceptorProperty sampleRateProp = properties.get("sampleRate");
        if (sampleRateProp == null) {
            throw new IllegalArgumentException(
                    "property \"sampleRate\" has not been set");
        }
        InterceptorProperty prefixProp = properties.get("prefix");
        if (prefixProp == null) {
            throw new IllegalArgumentException(
                    "property \"prefix\" has not been set");
        }

        metrics = new Metrics(hostnameProp.getValue(),
                portProp.getValueAsInt(0), prefixProp.getValue(),
                sampleRateProp.getValueAsDouble(1.0));
        proxyFactory = new ProxyFactory(metrics);
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

    }

    @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) {
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

    @Override
    public void setProperties(Map<String, InterceptorProperty> properties) {
        super.setProperties(properties);
        final String threshold = "notifyPool";
        InterceptorProperty p1 = properties.get(threshold);
        if (p1!=null) {
            this.setNotifyPool(Boolean.parseBoolean(p1.getValue()));
        }
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

    @Override
    public void setProperties(Map<String, InterceptorProperty> properties) {
        super.setProperties(properties);
        final String threshold = "threshold";
        final String maxqueries= "maxQueries";
        InterceptorProperty p1 = properties.get(threshold);
        InterceptorProperty p2 = properties.get(maxqueries);
        if (p1!=null) {
            setThreshold(Long.parseLong(p1.getValue()));
        }
        if (p2!=null) {
            setMaxQueries(Integer.parseInt(p2.getValue()));
        }
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

        super.setProperties(properties);
        final String threshold = "threshold";
        final String maxqueries= "maxQueries";
        final String logslow = "logSlow";
        final String logfailed = "logFailed";
        InterceptorProperty p1 = properties.get(threshold);
        InterceptorProperty p2 = properties.get(maxqueries);
        InterceptorProperty p3 = properties.get(logslow);
        InterceptorProperty p4 = properties.get(logfailed);
        if (p1!=null) {
            setThreshold(Long.parseLong(p1.getValue()));
        }
        if (p2!=null) {
            setMaxQueries(Integer.parseInt(p2.getValue()));
        }
        if (p3!=null) {
            setLogSlow(Boolean.getBoolean(p3.getValue()));
        }
        if (p4!=null) {
            setLogFailed(Boolean.getBoolean(p4.getValue()));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.