JEDIS connection cluster

Take the maven project as an example:
1. Configure pom. xml:




redis.clients
jedis
3.0.1
jar
compile

2. Main category: p>

public class RedisCluster {

public static void main(String[] args) {
Set
jedisClusterSet = new HashSet();
jedisClusterSet.add(
new HostAndPort("192.168.3.216", 6379 ));
JedisCluster jedisCluster
= new JedisCluster(jedisClusterSet);
jedisCluster.set(
"g", "gggg");
jedisCluster.lpush(
"h", "111","222","333","444");
System.out.println(jedisCluster.get(
"151"));
}
}




redis.clients
jedis
3.0.1
jar
compile

public class RedisCluster {

public static void main(String[] args) {
Set
jedisClusterSet = new HashSet();
jedisClusterSet.add(
new HostAndPort("192.168.3.216", 6379 ));
JedisCluster jedisCluster
= new JedisCluster(jedisClusterSet);
jedisCluster.set(
"g", "gggg");
jedisCluster.lpush(
"h", "111","222","333","444");
System.out.println(jedisCluster.get(
"151"));
}
}

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2394 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.