<?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:context="http://www.springframework.org/schema/context"
       xmlns:redisson="http://redisson.org/schema/redisson"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
       http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd
">
    <context:annotation-config/>
    <context:property-placeholder system-properties-mode="OVERRIDE"/>
    <redisson:client>
        <redisson:single-server address="${redisAddress}"/>
        <redisson:binary-stream                 id="binary-stream"              key="binary-stream"/>
        <redisson:geo                           id="geo"                        key="geo"/>
        <redisson:set-cache                     id="set-cache"                  key="set-cache"/>
        <redisson:map-cache                     id="map-cache"                  key="map-cache"/>
        <redisson:bucket                        id="bucket"                     key="bucket"/>
        <redisson:buckets                       id="buckets"/>
        <redisson:hyper-log-log                 id="hyper-log-log"              key="hyper-log-log"/>
        <redisson:list                          id="list"                       key="list"/>
        <redisson:list-multimap                 id="list-multimap"              key="list-multimap"/>
        <redisson:list-multimap-cache           id="list-multimap-cache"        key="list-multimap-cache"/>
        <redisson:local-cached-map              id="local-cached-map"           key="local-cached-map">
            <redisson:local-cached-map-options  id="local-options"              eviction-policy="LRU"
                                                time-to-live="1"                time-to-live-unit="SECONDS" />
        </redisson:local-cached-map>
        <redisson:map                           id="map"                        key="map"/>
        <redisson:set-multimap                  id="set-multimap"               key="set-multimap"/>
        <redisson:set-multimap-cache            id="set-multimap-cache"         key="set-multimap-cache"/>
        <redisson:semaphore                     id="semaphore"                  key="semaphore"/>
        <redisson:permit-expirable-semaphore    id="permit-expirable-semaphore" key="permit-expirable-semaphore"/>
        <redisson:lock                          id="lock"                       key="lock"/>
        <redisson:fair-lock                     id="fair-lock"                  key="fair-lock"/>
        <redisson:read-write-lock               id="read-write-lock"            key="read-write-lock">
            <redisson:read-lock                 id="read-lock"/>
            <redisson:write-lock                id="write-lock"/>
        </redisson:read-write-lock>
        <redisson:multi-lock                    id="multi-lock">
            <ref                                bean="lock"/>
            <redisson:lock                      id="lock-1"                     key="lock-1"/>
            <redisson:fair-lock                 id="fair-lock-1"                key="fair-lock-1"/>
            <redisson:write-lock                id="write-lock-1"               read-write-lock-ref="read-write-lock"/>
            <redisson:read-lock                 id="read-lock-1"                read-write-lock-ref="read-write-lock"/>
        </redisson:multi-lock>
        <redisson:red-lock                      id="red-lock">
            <ref                                bean="lock"/>
            <redisson:lock                      id="lock-2"                     key="lock-2"/>
            <redisson:fair-lock                 id="fair-lock-2"                key="fair-lock-2"/>
            <redisson:write-lock                id="write-lock-2"               read-write-lock-ref="read-write-lock"/>
            <redisson:read-lock                 id="read-lock-2"                read-write-lock-ref="read-write-lock"/>
        </redisson:red-lock>
        <redisson:set                           id="set"                        key="set"/>
        <redisson:sorted-set                    id="sorted-set"                 key="sorted-set"/>
        <redisson:scored-sorted-set             id="scored-sorted-set"          key="scored-sorted-set"/>
        <redisson:lex-sorted-set                id="lex-sorted-set"             key="lex-sorted-set"/>
        <redisson:topic                         id="topic"                      topic="topic"/>
        <redisson:pattern-topic                 id="pattern-topic"              pattern="pattern-topic"/>
        <redisson:blocking-fair-queue           id="blocking-fair-queue"        key="blocking-fair-queue"/>
        <redisson:queue                         id="queue"                      key="queue"/>
        <redisson:delayed-queue                 id="delayed-queue"              destination-queue-ref="queue"/>
        <redisson:priority-queue                id="priority-queue"             key="priority-queue"/>
        <redisson:priority-deque                id="priority-deque"             key="priority-deque"/>
        <redisson:blocking-queue                id="blocking-queue"             key="blocking-queue"/>
        <redisson:bounded-blocking-queue        id="bounded-blocking-queue"     key="bounded-blocking-queue"/>
        <redisson:deque                         id="deque"                      key="deque"/>
        <redisson:blocking-deque                id="blocking-deque"             key="blocking-deque"/>
        <redisson:atomic-long                   id="atomic-long"                key="atomic-long"/>
        <redisson:atomic-double                 id="atomic-double"              key="atomic-double"/>
        <redisson:count-down-latch              id="count-down-latch"           key="count-down-latch"/>
        <redisson:bit-set                       id="bit-set"                    key="bit-set"/>
        <redisson:bloom-filter                  id="bloom-filter"               key="bloom-filter"/>
        <redisson:script                        id="script"/>
        <redisson:executor-service              id="executor-service"           service="executor-service"/>
        <redisson:remote-service                id="remote-service"             service="remote-service">
            <redisson:rpc-server                api-class="org.redisson.RedissonRemoteServiceTest$RemoteInterface"
                                                bean="remoteBean"/>
            <redisson:rpc-client                id="rpc-client"                 api-class="org.redisson.RedissonRemoteServiceTest$RemoteInterface">
                <redisson:remote-invocation-options id="options">
                    <!--one of two--> 
                    <!--<redisson:remote-no-ack/>-->
                    <redisson:remote-ack        within="1"                      time-unit="SECONDS"/>
                    <!--one of two-->                     
                    <!--<redisson:remote-no-result/>-->
                    <redisson:remote-result     within="1"                      time-unit="SECONDS"/>
                </redisson:remote-invocation-options>
            </redisson:rpc-client>
        </redisson:remote-service>
        <redisson:keys                          id="keys"/>
        <redisson:live-object-service           id="live-object-service">
            <redisson:live-object-registration  class="org.redisson.RedissonLiveObjectServiceTest$TestREntity" />
            <redisson:live-object               id="live-object"                object-id="live-object"
                                                class="org.redisson.RedissonLiveObjectServiceTest$TestREntity" />
        </redisson:live-object-service>
    </redisson:client>
    
    <redisson:client id="myRedisson">
        <redisson:single-server address="${redisAddress}"/>
    </redisson:client>
    
    <redisson:client id="myRedisson1">
        <redisson:single-server address="${redisAddress}"/>
    </redisson:client>
    
    <!--External definitions-->
    <redisson:binary-stream                 id="binary-stream-ext"              key="binary-stream-ext"                     redisson-ref="myRedisson"/>
    <redisson:geo                           id="geo-ext"                        key="geo-ext"                               redisson-ref="myRedisson"/>
    <redisson:set-cache                     id="set-cache-ext"                  key="set-cache-ext"                         redisson-ref="myRedisson"/>
    <redisson:map-cache                     id="map-cache-ext"                  key="map-cache-ext"                         redisson-ref="myRedisson"/>
    <redisson:bucket                        id="bucket-ext"                     key="bucket-ext"                            redisson-ref="myRedisson"/>
    <redisson:buckets                       id="buckets-ext"                                                                redisson-ref="myRedisson"/>
    <redisson:hyper-log-log                 id="hyper-log-log-ext"              key="hyper-log-log-ext"                     redisson-ref="myRedisson"/>
    <redisson:list                          id="list-ext"                       key="list-ext"                              redisson-ref="myRedisson"/>
    <redisson:list-multimap                 id="list-multimap-ext"              key="list-multimap-ext"                     redisson-ref="myRedisson"/>
    <redisson:list-multimap-cache           id="list-multimap-cache-ext"        key="list-multimap-cache-ext"               redisson-ref="myRedisson"/>
    <redisson:local-cached-map              id="local-cached-map-ext"           key="local-cached-map-ext"                  redisson-ref="myRedisson">
        <redisson:local-cached-map-options  id="local-options-ext"              eviction-policy="LRU"
                                                time-to-live="1"                time-to-live-unit="SECONDS" />
    </redisson:local-cached-map>
    <redisson:map                           id="map-ext"                        key="map-ext"                               redisson-ref="myRedisson"/>
    <redisson:set-multimap                  id="set-multimap-ext"               key="set-multimap-ext"                      redisson-ref="myRedisson"/>
    <redisson:set-multimap-cache            id="set-multimap-cache-ext"         key="set-multimap-cache-ext"                redisson-ref="myRedisson"/>
    <redisson:semaphore                     id="semaphore-ext"                  key="semaphore-ext"                         redisson-ref="myRedisson"/>
    <redisson:permit-expirable-semaphore    id="permit-expirable-semaphore-ext" key="permit-expirable-semaphore-ext"        redisson-ref="myRedisson"/>
    <redisson:lock                          id="lock-ext"                       key="lock-ext"                              redisson-ref="myRedisson"/>
    <redisson:fair-lock                     id="fair-lock-ext"                  key="fair-lock-ext"                         redisson-ref="myRedisson"/>
    <redisson:read-write-lock               id="read-write-lock-ext"            key="read-write-lock-ext"                   redisson-ref="myRedisson">
        <redisson:read-lock                 id="read-lock-ext"/>
        <redisson:write-lock                id="write-lock-ext"/>
    </redisson:read-write-lock>
    <redisson:multi-lock                    id="multi-lock-ext"                                                             redisson-ref="myRedisson">
        <ref                                bean="lock-ext"/>
        <redisson:lock                      id="lock-1-ext"                     key="lock-1-ext"                            redisson-ref="myRedisson1"/>
        <redisson:fair-lock                 id="fair-lock-1-ext"                key="fair-lock-1-ext"                       redisson-ref="myRedisson1"/>
        <redisson:write-lock                id="write-lock-1-ext"               read-write-lock-ref="read-write-lock-ext"/>
        <redisson:read-lock                 id="read-lock-1-ext"                read-write-lock-ref="read-write-lock-ext"/>
    </redisson:multi-lock>
    <redisson:red-lock                      id="red-lock-ext"                                                               redisson-ref="myRedisson">
        <ref                                bean="lock-ext"/>
        <redisson:lock                      id="lock-2-ext"                     key="lock-2-ext"/>
        <redisson:fair-lock                 id="fair-lock-2-ext"                key="fair-lock-2-ext"/>
        <redisson:write-lock                id="write-lock-2-ext"               read-write-lock-ref="read-write-lock-ext"/>
        <redisson:read-lock                 id="read-lock-2-ext"                read-write-lock-ref="read-write-lock-ext"/>
    </redisson:red-lock>
    <redisson:set                           id="set-ext"                        key="set-ext"                               redisson-ref="myRedisson"/>
    <redisson:sorted-set                    id="sorted-set-ext"                 key="sorted-set-ext"                        redisson-ref="myRedisson"/>
    <redisson:scored-sorted-set             id="scored-sorted-set-ext"          key="scored-sorted-set-ext"                 redisson-ref="myRedisson"/>
    <redisson:lex-sorted-set                id="lex-sorted-set-ext"             key="lex-sorted-set-ext"                    redisson-ref="myRedisson"/>
    <redisson:topic                         id="topic-ext"                      topic="topic-ext"                           redisson-ref="myRedisson"/>
    <redisson:pattern-topic                 id="pattern-topic-ext"              pattern="pattern-topic-ext"                 redisson-ref="myRedisson"/>
    <redisson:blocking-fair-queue           id="blocking-fair-queue-ext"        key="blocking-fair-queue-ext"               redisson-ref="myRedisson"/>
    <redisson:queue                         id="queue-ext"                      key="queue-ext"                             redisson-ref="myRedisson"/>
    <redisson:delayed-queue                 id="delayed-queue-ext"              destination-queue-ref="queue-ext"           redisson-ref="myRedisson"/>
    <redisson:priority-queue                id="priority-queue-ext"             key="priority-queue-ext"                    redisson-ref="myRedisson"/>
    <redisson:priority-deque                id="priority-deque-ext"             key="priority-deque-ext"                    redisson-ref="myRedisson"/>
    <redisson:blocking-queue                id="blocking-queue-ext"             key="blocking-queue-ext"                    redisson-ref="myRedisson"/>
    <redisson:bounded-blocking-queue        id="bounded-blocking-queue-ext"     key="bounded-blocking-queue-ext"            redisson-ref="myRedisson"/>
    <redisson:deque                         id="deque-ext"                      key="deque-ext"                             redisson-ref="myRedisson"/>
    <redisson:blocking-deque                id="blocking-deque-ext"             key="blocking-deque-ext"                    redisson-ref="myRedisson"/>
    <redisson:atomic-long                   id="atomic-long-ext"                key="atomic-long-ext"                       redisson-ref="myRedisson"/>
    <redisson:atomic-double                 id="atomic-double-ext"              key="atomic-double-ext"                     redisson-ref="myRedisson"/>
    <redisson:count-down-latch              id="count-down-latch-ext"           key="count-down-latch-ext"                  redisson-ref="myRedisson"/>
    <redisson:bit-set                       id="bit-set-ext"                    key="bit-set-ext"                           redisson-ref="myRedisson"/>
    <redisson:bloom-filter                  id="bloom-filter-ext"               key="bloom-filter-ext"                      redisson-ref="myRedisson"/>
    <redisson:script                        id="script-ext"                                                                 redisson-ref="myRedisson"/>
    <redisson:executor-service              id="executor-service-ext"           service="executor-service-ext"              redisson-ref="myRedisson"/>
    <redisson:remote-service                id="remote-service-ext"             service="remote-service-ext"                redisson-ref="myRedisson">
        <redisson:rpc-server                api-class="org.redisson.RedissonRemoteServiceTest$RemoteInterface"
                                            bean="remoteBean"/>
        <redisson:rpc-client                id="rpc-client-ext"                 api-class="org.redisson.RedissonRemoteServiceTest$RemoteInterface">
            <redisson:remote-invocation-options id="options-ext">
                <redisson:remote-ack        within="1"                          time-unit="SECONDS"/>
                <redisson:remote-result     within="1"                          time-unit="SECONDS"/>
            </redisson:remote-invocation-options>
        </redisson:rpc-client>
    </redisson:remote-service>
    <redisson:keys                          id="keys-ext"                                                                   redisson-ref="myRedisson"/>
    <redisson:live-object-service           id="live-object-service-ext"                                                    redisson-ref="myRedisson">
        <redisson:live-object-registration  class="org.redisson.RedissonLiveObjectServiceTest$TestREntity" />
        <redisson:live-object               id="live-object-ext"                object-id="live-object-ext"
                                                class="org.redisson.RedissonLiveObjectServiceTest$TestREntity" />
    </redisson:live-object-service>
    
    <bean id="remoteBean" class="org.redisson.RedissonRemoteServiceTest.RemoteImpl" />
</beans>
