Skip to content

Instantly share code, notes, and snippets.

@tague
Last active June 14, 2018 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tague/7120389778b3e213b34f45a7b70fd839 to your computer and use it in GitHub Desktop.
Save tague/7120389778b3e213b34f45a7b70fd839 to your computer and use it in GitHub Desktop.
Sample Java SSL Redis Program
import redis.clients.jedis.Jedis;
public class SSLTest
{
private static final String HOSTNAME = "your Redis Enterprise endpoint";
private static final int PORT = 6379;
public static void main (String[] args) {
try {
Jedis jedis = new Jedis(HOSTNAME, PORT, true);
jedis.connect();
jedis.auth("secret");
System.out.println(jedis.ping());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment