Package org.springframework.data.redis.connection

Examples of org.springframework.data.redis.connection.DefaultStringRedisConnection.flushDb()


  public void testSelectDb() {
    LettuceConnectionFactory factory2 = new LettuceConnectionFactory(SettingsUtils.getHost(), SettingsUtils.getPort());
    factory2.setDatabase(1);
    factory2.afterPropertiesSet();
    StringRedisConnection connection2 = new DefaultStringRedisConnection(factory2.getConnection());
    connection2.flushDb();
    // put an item in database 0
    connection.set("sometestkey", "sometestvalue");
    try {
      // there should still be nothing in database 1
      assertEquals(Long.valueOf(0), connection2.dbSize());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.