zoukankan      html  css  js  c++  java
  • danga memcacheClient与spring结合

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
        xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                ">
    
        <bean id="memcachedPool" class="com.danga.MemCached.SockIOPool"
            factory-method="getInstance" init-method="initialize" destroy-method="shutDown">
            <constructor-arg>
                <value>neeaMemcachedPool</value>
            </constructor-arg>
            <property name="servers">
                <list>
                    <value>${memcache.server}</value>
                </list>
            </property>
            <property name="initConn">
                <value>${memcache.initConn}</value>
            </property>
            <property name="minConn">
                <value>${memcache.minConn}</value>
            </property>
            <property name="maxConn">
                <value>${memcache.maxConn}</value>
            </property>
            <property name="maintSleep">
                <value>${memcache.maintSleep}</value>
            </property>
            <property name="nagle">
                <value>${memcache.nagle}</value>
            </property>
            <property name="socketTO">
                <value>${memcache.socketTO}</value>
            </property>
        </bean>
        <bean id="memcachedClient" class="com.danga.MemCached.MemCachedClient"
            depends-on="memcachedPool">
            <constructor-arg>
                <value>neeaMemcachedPool</value>
            </constructor-arg>
        </bean>
        <bean id="memcache" class="com.jtxw.cache.impl.MemcacheService">
            <property name="client" ref="memcachedClient"></property>
        </bean>
    </beans>
    memcache.server=127.0.0.1\:11211
    memcache.initConn=20
    memcache.minConn=10
    memcache.maxConn=50
    memcache.maintSleep=3000
    memcache.nagle=false
    memcache.socketTO=3000
  • 相关阅读:
    dos命令积累
    bt的SoundMixerl类
    给自己一个定位
    自我的反思
    计算机爱好者 VS. 程序员
    flash实现bt传输方式
    flash获取不到页面传进来的参数的一种情况
    教程:深入理解Flash的沙箱 – Application Domains
    使用URLLoader做上传出现的问题
    原创系列之:Flex数据绑定基础介绍[转]
  • 原文地址:https://www.cnblogs.com/atyou/p/2840460.html
Copyright © 2011-2022 走看看