-
-
Save tague/7120389778b3e213b34f45a7b70fd839 to your computer and use it in GitHub Desktop.
Sample Java SSL Redis Program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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