#166 - Rename Redis cluster-sentinel to sentinel.
Rename the Redis cluster-sentinel project to sentinel and leave a hint in the cluster-sentinel directory that points to the Redis Cluster and Redis Sentinel examples mentioning clarifying the cluster-sentinel naming.
This commit is contained in:
@@ -38,7 +38,7 @@ We have separate folders for the samples of individual modules:
|
||||
|
||||
* `example` - Example for basic Spring Data Redis setup.
|
||||
* `cluster` - Example for Redis Cluster support.
|
||||
* `cluster-sentinel` - Example for Redis Sentinel support.
|
||||
* `sentinel` - Example for Redis Sentinel support.
|
||||
* `repository` - Example demonstrating Spring Data repository abstraction on top of Redis.
|
||||
|
||||
## Spring Data Elasticsearch
|
||||
|
||||
@@ -1,28 +1,5 @@
|
||||
# Spring Data Redis - Sentinel Examples
|
||||
# Spring Data Redis Example
|
||||
|
||||
This project contains samples of Sentinel specific features of Spring Data Redis.
|
||||
|
||||
## Support for Sentinel
|
||||
|
||||
```java
|
||||
@Configuration
|
||||
public class RedisSentinelApplicationConfig {
|
||||
|
||||
static final RedisSentinelConfiguration SENTINEL_CONFIG = new RedisSentinelConfiguration().master("mymaster") //
|
||||
.sentinel("localhost", 26379) //
|
||||
.sentinel("localhost", 26380) //
|
||||
.sentinel("localhost", 26381);
|
||||
|
||||
@Bean
|
||||
public RedisConnectionFactory connectionFactory() {
|
||||
return new JedisConnectionFactory(sentinelConfig());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RedisSentinelConfiguration sentinelConfig() {
|
||||
return SENTINEL_CONFIG;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
The this example was named a bit misleading as `cluster-sentinel` is a mix of Redis Cluster and Redis Sentinel.
|
||||
|
||||
Find dedicated examples here: [Redis Cluster](../cluster) and [Redis Sentinel](../sentinel).
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
<description>Sample projects for Spring Data Redis</description>
|
||||
|
||||
<modules>
|
||||
<module>util</module>
|
||||
<module>cluster-sentinel</module>
|
||||
<module>example</module>
|
||||
<module>cluster</module>
|
||||
<module>repositories</module>
|
||||
<module>example</module>
|
||||
<module>reactive</module>
|
||||
<module>repositories</module>
|
||||
<module>sentinel</module>
|
||||
<module>util</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
||||
28
redis/sentinel/README.md
Normal file
28
redis/sentinel/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Spring Data Redis - Sentinel Examples
|
||||
|
||||
This project contains samples of Sentinel specific features of Spring Data Redis.
|
||||
|
||||
## Support for Sentinel
|
||||
|
||||
```java
|
||||
@Configuration
|
||||
public class RedisSentinelApplicationConfig {
|
||||
|
||||
static final RedisSentinelConfiguration SENTINEL_CONFIG = new RedisSentinelConfiguration().master("mymaster") //
|
||||
.sentinel("localhost", 26379) //
|
||||
.sentinel("localhost", 26380) //
|
||||
.sentinel("localhost", 26381);
|
||||
|
||||
@Bean
|
||||
public RedisConnectionFactory connectionFactory() {
|
||||
return new JedisConnectionFactory(sentinelConfig());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RedisSentinelConfiguration sentinelConfig() {
|
||||
return SENTINEL_CONFIG;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-data-redis-cluster-sentinel-example</artifactId>
|
||||
<name>Spring Data Redis - Cluster/Sentinel Example</name>
|
||||
<artifactId>spring-data-redis-sentinel-example</artifactId>
|
||||
<name>Spring Data Redis - Sentinel Example</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.data.examples</groupId>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
Reference in New Issue
Block a user