• 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
  • 相关阅读:
    TCHAR转化为UTF8
    Chromium ID 计算方法
    构建之法感悟
    项目名称:上海地铁游
    统一入口的Ajax验证
    基于用户体验的服务型政府网站群建设优化方案
    新技术下的政府门户网站群建设建议
    国内CMS技术发展的外在表现形式
    JavaScript基础 BOM
    JavaScript基础 常见DOM树操作
  • 原文地址:https://www.cnblogs.com/atyou/p/2840460.html
Copyright © 2020-2023  润新知