List of usage examples for org.springframework.data.redis.connection RedisConnectionFactory getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.gopivotal.cloudfoundry.test.core.RedisUtils.java
public String getUrl(RedisConnectionFactory redisConnectionFactory) { if (isClass(redisConnectionFactory, "com.gopivotal.cloudfoundry.test.core.FakeRedisConnectionFactory")) { return "redis://fake"; } else if (isClass(redisConnectionFactory, "org.springframework.data.redis.connection.jedis" + ".JedisConnectionFactory")) { org.springframework.data.redis.connection.jedis.JedisConnectionFactory jedisConnectionFactory = (org.springframework.data.redis.connection.jedis.JedisConnectionFactory) redisConnectionFactory; String host = jedisConnectionFactory.getHostName(); int port = jedisConnectionFactory.getPort(); return String.format("redis://%s:%d", host, port); }/*from ww w. j a v a 2 s .co m*/ return String.format("Unable to determine URL for RedisConnectionFactory of type %s", redisConnectionFactory.getClass().getName()); }