Skip to content

Instantly share code, notes, and snippets.

@syamsathyan
Created May 23, 2016 23:33
Show Gist options
  • Save syamsathyan/ac36f3664226ef9807587f0ba6da78d0 to your computer and use it in GitHub Desktop.
Save syamsathyan/ac36f3664226ef9807587f0ba6da78d0 to your computer and use it in GitHub Desktop.
redisServer.start();
//Start Jedis ConnFactory
JedisShardInfo shardInfo = new JedisShardInfo("localhost", 6379);
connectionFactory = new JedisConnectionFactory();
connectionFactory.setShardInfo(shardInfo);
//Init RedisTemplate
template = new StringRedisTemplate();
template.setConnectionFactory(connectionFactory);
template.afterPropertiesSet();
//Set OpsForVal
template.opsForValue().set("rasp_ver", stripHalVer(pingHal())); // Gets OS version from HAL, Strip the 'ver' Magic No#(current 'Jess-16') - (FIXME - Syam* DCM)
//Get OpsForVal
String result = template.opsForValue().get("rasp_ver");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment