Package org.springframework.data.redis.connection

Examples of org.springframework.data.redis.connection.DefaultStringRedisConnection$IdentityConverter


    verifyResults(Arrays.asList(new Object[] { true }));
    // Lettuce does not support select when using shared conn, use a new conn factory
    LettuceConnectionFactory factory2 = new LettuceConnectionFactory();
    factory2.setDatabase(1);
    factory2.afterPropertiesSet();
    StringRedisConnection conn2 = new DefaultStringRedisConnection(factory2.getConnection());
    try {
      assertEquals("bar", conn2.get("foo"));
    } finally {
      if (conn2.exists("foo")) {
        conn2.del("foo");
      }
      conn2.close();
      factory2.destroy();
    }
  }
View Full Code Here


  public void testWatch() {
    connection.set("testitnow", "willdo");
    connection.watch("testitnow".getBytes());
    // Jedis doesn't actually send commands until you close the pipeline
    getResults();
    DefaultStringRedisConnection conn2 = new DefaultStringRedisConnection(connectionFactory.getConnection());
    conn2.set("testitnow", "something");
    conn2.close();
    // Reopen the pipeline
    initConnection();
    connection.multi();
    connection.set("testitnow", "somethingelse");
    actual.add(connection.exec());
View Full Code Here

    connection.unwatch();
    // Jedis doesn't actually send commands until you close the pipeline
    getResults();
    initConnection();
    connection.multi();
    DefaultStringRedisConnection conn2 = new DefaultStringRedisConnection(connectionFactory.getConnection());
    conn2.set("testitnow", "something");
    connection.set("testitnow", "somethingelse");
    connection.get("testitnow");
    actual.add(connection.exec());
    List<Object> results = getResults();
    List<Object> execResults = (List<Object>) results.get(0);
View Full Code Here

      public void run() {
        // Use separate conn factory to avoid using the underlying shared native conn on blocking script
        final LettuceConnectionFactory factory2 = new LettuceConnectionFactory(SettingsUtils.getHost(),
            SettingsUtils.getPort());
        factory2.afterPropertiesSet();
        DefaultStringRedisConnection conn2 = new DefaultStringRedisConnection(factory2.getConnection());
        try {
          conn2.eval("local time=1 while time < 10000000000 do time=time+1 end", ReturnType.BOOLEAN, 0);
        } catch (DataAccessException e) {
          scriptDead.set(true);
        }
        conn2.close();
        factory2.destroy();
      }
    });
    th.start();
    Thread.sleep(1000);
View Full Code Here

    verifyResults(Arrays.asList(new Object[] { true }));
    // Lettuce does not support select when using shared conn, use a new conn factory
    LettuceConnectionFactory factory2 = new LettuceConnectionFactory();
    factory2.setDatabase(1);
    factory2.afterPropertiesSet();
    StringRedisConnection conn2 = new DefaultStringRedisConnection(factory2.getConnection());
    try {
      assertEquals("bar", conn2.get("foo"));
    } finally {
      if (conn2.exists("foo")) {
        conn2.del("foo");
      }
      conn2.close();
      factory2.destroy();
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.redis.connection.DefaultStringRedisConnection$IdentityConverter

Copyright © 2018 www.massapicom. 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.