diff --git a/redisson/src/main/java/org/redisson/spring/support/RedisDefinitionParser.java b/redisson/src/main/java/org/redisson/spring/support/RedisDefinitionParser.java index 6c02eee29..ee164ee5d 100644 --- a/redisson/src/main/java/org/redisson/spring/support/RedisDefinitionParser.java +++ b/redisson/src/main/java/org/redisson/spring/support/RedisDefinitionParser.java @@ -16,6 +16,8 @@ package org.redisson.spring.support; import org.redisson.client.RedisClient; +import org.redisson.client.RedisClientConfig; +import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; @@ -26,20 +28,21 @@ import org.w3c.dom.Element; * * @author Rui Gu (https://github.com/jackygurui) */ -public final class RedisDefinitionParser +public final class RedisDefinitionParser extends AbstractSimpleBeanDefinitionParser { - + + private static final String ADDRESS_ATTRIBUTE = "address"; private static final String HOST_ATTRIBUTE = "host"; private static final String PORT_ATTRIBUTE = "port"; private static final String CONNECTION_TIMEOUT_ATTRIBUTE = "connectionTimeout"; private static final String COMMAND_TIMEOUT_ATTRIBUTE = "commandTimeout"; - + private final RedissonNamespaceParserSupport helper; - + public RedisDefinitionParser(RedissonNamespaceParserSupport helper) { this.helper = helper; } - + @Override protected Class getBeanClass(Element element) { return RedisClient.class; @@ -48,14 +51,27 @@ public final class RedisDefinitionParser @Override protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { builder.getRawBeanDefinition().setBeanClass(RedisClient.class); - helper.addConstructorArgs(element, - HOST_ATTRIBUTE, String.class, builder); - helper.addConstructorArgs(element, - PORT_ATTRIBUTE, int.class, builder); - helper.addConstructorArgs(element, - CONNECTION_TIMEOUT_ATTRIBUTE, int.class, builder); - helper.addConstructorArgs(element, - COMMAND_TIMEOUT_ATTRIBUTE, int.class, builder); + if (helper.hasAttribute(element, HOST_ATTRIBUTE)) { + helper.addConstructorArgs(element, + HOST_ATTRIBUTE, String.class, builder); + helper.addConstructorArgs(element, + PORT_ATTRIBUTE, int.class, builder); + helper.addConstructorArgs(element, + CONNECTION_TIMEOUT_ATTRIBUTE, int.class, builder); + helper.addConstructorArgs(element, + COMMAND_TIMEOUT_ATTRIBUTE, int.class, builder); + } else { + BeanDefinitionBuilder b + = helper.createBeanDefinitionBuilder(element, + parserContext, + RedisClientConfig.class); + String configId = helper.getId(null, b, parserContext); + helper.parseAttributes(element, parserContext, b); + BeanComponentDefinition def + = helper.registerBeanDefinition(b, configId, + null, parserContext); + helper.addConstructorArgs(def, RedisClientConfig.class, builder); + } builder.setDestroyMethodName("shutdown"); parserContext.getDelegate().parseQualifierElements(element, builder.getRawBeanDefinition()); @@ -65,7 +81,7 @@ public final class RedisDefinitionParser protected boolean shouldGenerateIdAsFallback() { return true; } - + @Override protected boolean isEligibleAttribute(String attributeName) { return helper.isEligibleAttribute(attributeName); diff --git a/redisson/src/main/resources/META-INF/spring.schemas b/redisson/src/main/resources/META-INF/spring.schemas index 274331f67..f5503f254 100644 --- a/redisson/src/main/resources/META-INF/spring.schemas +++ b/redisson/src/main/resources/META-INF/spring.schemas @@ -1,2 +1,3 @@ -http\://redisson.org/schema/redisson/redisson.xsd=org/redisson/spring/support/redisson-1.0.xsd +http\://redisson.org/schema/redisson/redisson.xsd=org/redisson/spring/support/redisson-1.1.xsd http\://redisson.org/schema/redisson/redisson-1.0.xsd=org/redisson/spring/support/redisson-1.0.xsd +http\://redisson.org/schema/redisson/redisson-1.1.xsd=org/redisson/spring/support/redisson-1.1.xsd diff --git a/redisson/src/main/resources/org/redisson/spring/support/redisson-1.1.xsd b/redisson/src/main/resources/org/redisson/spring/support/redisson-1.1.xsd new file mode 100644 index 000000000..6cadaa351 --- /dev/null +++ b/redisson/src/main/resources/org/redisson/spring/support/redisson-1.1.xsd @@ -0,0 +1,2429 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + netty-tcnative lib is required to be in classpath. + ]]> + + + + + + + + + + + + + + + <qualifier> is not used. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + timeout time + and current connections amount bigger than minimum idle connections pool + size, then it will closed and removed from pool. + Value in milliseconds. + + Default: 10000 + ]]> + + + + + Node.ping and Node.pingAll + operation. Value in milliseconds. + + Default: 1000 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + failedAttempts. + + Default: 3 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + each slave + node. + + Default: 10 + ]]> + + + + + each slave + node. + + Default: 64 + ]]> + + + + + each slave + node. + + Default: 10 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NB: applications must ensure the JVM DNS cache TTL is low enough to + support this. e.g., http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-jvm-ttl.html + + Default: false + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true then invalidation + message which removes corresponding entry from cache will be sent to all + other RLocalCachedMap instances on each entry update/remove operation. + if false then invalidation message won't be sent. + ]]> + + + + + LRU - uses cache with LRU (least recently used) eviction + policy. +

LFU - uses cache with LFU (least frequently used) + eviction policy. +

SOFT - uses cache with soft references. The garbage + collector will evict items from the cache when the JVM is + running out of memory. JVM flag -XX:SoftRefLRUPolicyMSPerMB=??? + is required to function. +

NONE - doesn't use eviction policy, but timeToLive and + maxIdleTime params are still working. + ]]> + + + + + 0 then local cache is unbounded. + ]]> + + + + + 0 then timeout is not applied. + + Default unit is MILLISECONDS + ]]> + + + + + + + + + + 0 then timeout is not applied. + + Default unit is MILLISECONDS + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT mandatory + since the class will also be registered lazily when it is first used. + + All classed registered with the service is stored in a class cache. + + The cache is independent between different RedissonClient instances. When + a class is registered in one RLiveObjectService instance it is also + accessible in another RLiveObjectService instance so long as they are + created by the same RedissonClient instance. + ]]> + + + + + + + + + + + + + + + + + + NOT mandatory + since the class will also be registered lazily when it is first used. + + All classed registered with the service is stored in a class cache. + + The cache is independent between different RedissonClient instances. When + a class is registered in one RLiveObjectService instance it is also + accessible in another RLiveObjectService instance so long as they are + created by the same RedissonClient instance. + + One of "object-id" or "object-id-ref" attribute is required. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set eviction + + Redisson distributed Set for Java with eviction support implemented by + separate RSetCache object which extends RSet interface. It also + implements java.util.Set interface. + + Current redis implementation doesn't has set value eviction + functionality. Therefore expired values are cleaned by + org.redisson.EvictionScheduler. It removes 100 expired values at once. + Task launch time tuned automatically and depends on expired entries + amount deleted in previous time and varies between 1 second to 2 hours. + Thus if clean task deletes 100 values each time it will be executed + every second (minimum execution delay). But if current expired values + amount is lower than previous one then execution delay will be increased + by 1.5 times. + ]]> + + + + + + + + + + + Map eviction + + Redisson distributed Map for Java with eviction support implemented by + separate RMapCache object which extends RMap interface. It keeps + elements in insertion order and implements + java.util.concurrent.ConcurrentMap and java.util.Map interfaces. + Redisson has a Spring Cache integration which based on Map and MapCache + objects. + + Current redis implementation doesn't has map entry eviction + functionality. Therefore expired entries are cleaned by + org.redisson.EvictionScheduler. It removes 100 expired entries at once. + Task launch time tuned automatically and depends on expired entries + amount deleted in previous time and varies between 1 second to 2 hours. + Thus if clean task deletes 100 entries each time it will be executed + every second (minimum execution delay). But if current expired entries + amount is lower than previous one then execution delay will be increased + by 1.5 times. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Map local cache + + In case when a Map is used mostly for read operations and/or network + roundtrips are undesirable. Redisson offers RLocalCachedMap object which + caches Map entries on Redisson side. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + interface. + Keeps elements uniqueness via element state comparison. + ]]> + + + + + + + + + + + interface. + Keeps elements uniqueness via element state comparison. + ]]> + + + + + + + + + + + + + + + + + interface. + Keeps elements uniqueness via element state comparison. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Live distributed object (also abbreviated as live object) refers to a + running instance of a distributed multi-party (or peer-to-peer) protocol, + viewed from the object-oriented perspective, as an entity that has a + distinct identity, may encapsulate internal state and threads of + execution, and that exhibits a well-defined externally visible behavior. + + + Redisson Live Object (RLO) realised this idea by mapping all the fields + inside a Java class to a redis hash through a runtime-constructed proxy + class. All the get/set methods of each field are translated to hget/hset + commands operated on the redis hash, making it accessable to/from any + clients connected to the same redis server. As we all know, the field + values of an object represent its state; having them stored in a remote + repository, redis, makes it a distributed object. This object is a + Redisson Live Object. + + By using RLO, sharing an object between applications and/or servers is + the same as sharing one in a standalone application. This removes the + need for serialization and deserialization, and at the same time reduces + the complexity of the programming model: Changes made to one field + is (almost^) immediately accessable to other processes, applications and + servers. (^Redis' eventual consistant replication rule still applies + when connected to slave nodes) + + Since the redis server is a single-threaded application, all field + access to the live object is automatically executed in atomic fashion: a + value will not be changed when you are reading it. + + With RLO, you can treat the redis server as a shared Heap space for all + connected JVMs. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Define and create a Redisson instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Define and create a RedisClient instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceTest.java b/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceTest.java index 588dbbf24..c4e9d7ca0 100644 --- a/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceTest.java +++ b/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceTest.java @@ -61,7 +61,7 @@ public class SpringNamespaceTest extends BaseTest { } public static void startContext() throws Exception { - System.setProperty("redisAddress", RedisRunner.getDefaultRedisServerBindAddressAndPort()); + System.setProperty("redisAddress", "redis://" + RedisRunner.getDefaultRedisServerBindAddressAndPort()); //Needs a instance running on the default port, launch it if there isn't one already if (RedisRunner.isFreePort(6379)) { @@ -79,7 +79,7 @@ public class SpringNamespaceTest extends BaseTest { RedisRunner.getDefaultRedisServerInstance().getRedisServerBindAddress(), RedisRunner.getDefaultRedisServerInstance().getRedisServerPort()) .run(); - System.setProperty("slave1Address", slave1.getRedisServerAddressAndPort()); + System.setProperty("slave1Address", "redis://" + slave1.getRedisServerAddressAndPort()); RedisRunner.RedisProcess slave2 = new RedisRunner() .nosave() @@ -89,7 +89,7 @@ public class SpringNamespaceTest extends BaseTest { RedisRunner.getDefaultRedisServerInstance().getRedisServerBindAddress(), RedisRunner.getDefaultRedisServerInstance().getRedisServerPort()) .run(); - System.setProperty("slave2Address", slave2.getRedisServerAddressAndPort()); + System.setProperty("slave2Address", "redis://" + slave2.getRedisServerAddressAndPort()); RedisRunner.RedisProcess sentinel1 = new RedisRunner() .nosave() @@ -101,7 +101,7 @@ public class SpringNamespaceTest extends BaseTest { RedisRunner.getDefaultRedisServerInstance().getRedisServerBindAddress(), RedisRunner.getDefaultRedisServerInstance().getRedisServerPort(), 2).run(); - System.setProperty("sentinel1Address", sentinel1.getRedisServerAddressAndPort()); + System.setProperty("sentinel1Address", "redis://" + sentinel1.getRedisServerAddressAndPort()); RedisRunner.RedisProcess sentinel2 = new RedisRunner() .nosave() @@ -113,7 +113,7 @@ public class SpringNamespaceTest extends BaseTest { RedisRunner.getDefaultRedisServerInstance().getRedisServerBindAddress(), RedisRunner.getDefaultRedisServerInstance().getRedisServerPort(), 2).run(); - System.setProperty("sentinel2Address", sentinel2.getRedisServerAddressAndPort()); + System.setProperty("sentinel2Address", "redis://" + sentinel2.getRedisServerAddressAndPort()); RedisRunner.RedisProcess sentinel3 = new RedisRunner() .nosave() @@ -125,7 +125,7 @@ public class SpringNamespaceTest extends BaseTest { RedisRunner.getDefaultRedisServerInstance().getRedisServerBindAddress(), RedisRunner.getDefaultRedisServerInstance().getRedisServerPort(), 2).run(); - System.setProperty("sentinel3Address", sentinel3.getRedisServerAddressAndPort()); + System.setProperty("sentinel3Address", "redis://" + sentinel3.getRedisServerAddressAndPort()); RedisRunner slave = new RedisRunner().randomPort().randomDir().nosave(); ClusterRunner clusterRunner = new ClusterRunner() .addNode(new RedisRunner().randomPort().randomDir().nosave(),//master1 @@ -143,7 +143,7 @@ public class SpringNamespaceTest extends BaseTest { new RedisRunner().randomPort().randomDir().nosave());//slave1-3-2 final AtomicLong index = new AtomicLong(0); clusterRunner.run().getNodes().stream().forEach((node) -> { - System.setProperty("node" + (index.incrementAndGet()) + "Address", node.getRedisServerAddressAndPort()); + System.setProperty("node" + (index.incrementAndGet()) + "Address", "redis://" + node.getRedisServerAddressAndPort()); }); context = new ClassPathXmlApplicationContext("classpath:org/redisson/spring/support/namespace.xml"); diff --git a/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceWikiTest.java b/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceWikiTest.java index 861955096..2d4c07f61 100644 --- a/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceWikiTest.java +++ b/redisson/src/test/java/org/redisson/spring/support/SpringNamespaceWikiTest.java @@ -2,7 +2,9 @@ package org.redisson.spring.support; import io.netty.channel.EventLoopGroup; import java.lang.reflect.Method; +import java.util.Map; import java.util.concurrent.Executor; +import static org.hamcrest.Matchers.*; import org.junit.Test; import org.redisson.ClusterRunner; import org.redisson.RedisRunner; @@ -11,7 +13,10 @@ import org.redisson.config.Config; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.junit.Assert.*; +import org.redisson.client.RedisClient; +import org.redisson.client.RedisConnection; import org.redisson.client.codec.Codec; +import org.redisson.client.protocol.RedisCommands; import org.redisson.codec.CodecProvider; import org.redisson.config.SingleServerConfig; import org.redisson.liveobject.provider.ResolverProvider; @@ -38,6 +43,27 @@ public class SpringNamespaceWikiTest { } } + @Test + public void testRedisClient() throws Exception { + RedisRunner.RedisProcess run = new RedisRunner() + .requirepass("do_not_use_if_it_is_not_set") + .nosave() + .randomDir() + .run(); + try { + ClassPathXmlApplicationContext context + = new ClassPathXmlApplicationContext("classpath:org/redisson/spring/support/namespace_wiki_redis_client.xml"); + RedisClient redisClient = context.getBean(RedisClient.class); + RedisConnection connection = redisClient.connect(); + Map info = connection.sync(RedisCommands.INFO_ALL); + assertThat(info, notNullValue()); + assertThat(info, not(info.isEmpty())); + ((ConfigurableApplicationContext) context).close(); + } finally { + run.stop(); + } + } + @Test public void testSingleWithPlaceholder() throws Exception { RedisRunner.RedisProcess run = new RedisRunner() @@ -66,6 +92,12 @@ public class SpringNamespaceWikiTest { System.setProperty("redisson.password", "do_not_use_if_it_is_not_set"); System.setProperty("redisson.subscriptionsPerConnection", "10"); System.setProperty("redisson.clientName", "client_name"); + System.setProperty("redisson.sslEnableEndpointIdentification", "true"); + System.setProperty("redisson.sslProvider", "JDK"); + System.setProperty("redisson.sslTruststore", "/tmp/truststore.p12"); + System.setProperty("redisson.sslTruststorePassword", "not_set"); + System.setProperty("redisson.sslKeystore", "/tmp/keystore.p12"); + System.setProperty("redisson.sslKeystorePassword", "not_set"); System.setProperty("redisson.subscriptionConnectionMinimumIdleSize", "11"); System.setProperty("redisson.subscriptionConnectionPoolSize", "12"); System.setProperty("redisson.connectionMinimumIdleSize", "13"); diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace.xml index 928ee1847..33e544be3 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_cluster.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_cluster.xml index 1689951e5..dd9957da7 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_cluster.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_cluster.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> @@ -51,6 +51,12 @@ password="do_not_use_if_it_is_not_set" subscriptions-per-connection="5" client-name="none" + ssl-enable-endpoint-identification="true" + ssl-provider="JDK" + ssl-truststore="/tmp/truststore.p12" + ssl-truststore-password="no_pass" + ssl-keystore="/tmp/keystore.p12" + ssl-keystore-password="no_pass" load-balancer-ref="myLoadBalancer" subscription-connection-minimum-idle-size="1" subscription-connection-pool-size="50" @@ -62,9 +68,9 @@ subscription-mode="SLAVE" scan-interval="1000" > - - - + + + diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_master_slave.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_master_slave.xml index 12003cbe3..857cafea3 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_master_slave.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_master_slave.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> @@ -51,6 +51,12 @@ password="do_not_use_if_it_is_not_set" subscriptions-per-connection="5" client-name="none" + ssl-enable-endpoint-identification="true" + ssl-provider="JDK" + ssl-truststore="/tmp/truststore.p12" + ssl-truststore-password="no_pass" + ssl-keystore="/tmp/keystore.p12" + ssl-keystore-password="no_pass" load-balancer-ref="myLoadBalancer" subscription-connection-minimum-idle-size="1" subscription-connection-pool-size="50" @@ -60,11 +66,11 @@ master-connection-pool-size="64" read-mode="SLAVE" subscription-mode="SLAVE" - master-address="127.0.0.1:6379" + master-address="redis://127.0.0.1:6379" database="0" > - - + + diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_redis_client.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_redis_client.xml new file mode 100644 index 000000000..738fe02e0 --- /dev/null +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_redis_client.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_replicated.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_replicated.xml index 450ea9d98..bd8cbaa5b 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_replicated.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_replicated.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> @@ -51,6 +51,12 @@ password="do_not_use_if_it_is_not_set" subscriptions-per-connection="5" client-name="none" + ssl-enable-endpoint-identification="true" + ssl-provider="JDK" + ssl-truststore="/tmp/truststore.p12" + ssl-truststore-password="no_pass" + ssl-keystore="/tmp/keystore.p12" + ssl-keystore-password="no_pass" load-balancer-ref="myLoadBalancer" subscription-connection-minimum-idle-size="1" subscription-connection-pool-size="50" @@ -63,9 +69,9 @@ scan-interval="1000" database="0" > - - - + + + diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_sentinel.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_sentinel.xml index 49d188775..3389317f2 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_sentinel.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_sentinel.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> @@ -51,6 +51,12 @@ password="do_not_use_if_it_is_not_set" subscriptions-per-connection="5" client-name="none" + ssl-enable-endpoint-identification="true" + ssl-provider="JDK" + ssl-truststore="/tmp/truststore.p12" + ssl-truststore-password="no_pass" + ssl-keystore="/tmp/keystore.p12" + ssl-keystore-password="no_pass" load-balancer-ref="myLoadBalancer" subscription-connection-minimum-idle-size="1" subscription-connection-pool-size="50" @@ -63,8 +69,8 @@ master-name="myMaster" database="0" > - - + + diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single.xml index 4c49a82fe..a532b149d 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> @@ -49,8 +49,14 @@ failed-attempts="3" password="do_not_use_if_it_is_not_set" subscriptions-per-connection="5" - client-name="none" - address="127.0.0.1:6379" + client-name="none" + ssl-enable-endpoint-identification="true" + ssl-provider="JDK" + ssl-truststore="/tmp/truststore.p12" + ssl-truststore-password="no_pass" + ssl-keystore="/tmp/keystore.p12" + ssl-keystore-password="no_pass" + address="redis://127.0.0.1:6379" subscription-connection-minimum-idle-size="1" subscription-connection-pool-size="50" connection-minimum-idle-size="10" diff --git a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml index 01962d373..fb73fcb7d 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/namespace_wiki_single_with_placeholder.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd "> @@ -43,7 +43,13 @@ failed-attempts="${redisson.failedAttempts}" password="${redisson.password}" subscriptions-per-connection="${redisson.subscriptionsPerConnection}" - client-name="${redisson.clientName}" + client-name="${redisson.clientName}" + ssl-enable-endpoint-identification="${redisson.sslEnableEndpointIdentification}" + ssl-provider="${redisson.sslProvider}" + ssl-truststore="${redisson.sslTruststore}" + ssl-truststore-password="${redisson.sslTruststorePassword}" + ssl-keystore="${redisson.sslKeystore}" + ssl-keystore-password="${redisson.sslKeystorePassword}" address="${redisson.redisAddress}" subscription-connection-minimum-idle-size="${redisson.subscriptionConnectionMinimumIdleSize}" subscription-connection-pool-size="${redisson.subscriptionConnectionPoolSize}" diff --git a/redisson/src/test/resources/org/redisson/spring/support/redisson_objects.xml b/redisson/src/test/resources/org/redisson/spring/support/redisson_objects.xml index 3e3b64504..925eccf26 100644 --- a/redisson/src/test/resources/org/redisson/spring/support/redisson_objects.xml +++ b/redisson/src/test/resources/org/redisson/spring/support/redisson_objects.xml @@ -6,7 +6,7 @@ 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.0.xsd + http://redisson.org/schema/redisson classpath:org/redisson/spring/support/redisson-1.1.xsd ">