Ok, I feel like I'm missing some crucial piece of information.
Locally I have 1 master and 1 slave redis server running on different ports http://redis.io/topics/sentinel
I also have 3 sentinels and they all appear to be aware of each other and working as expected.
Now I have a big of java code pointing to 127.0.0.1:6379 where my master redis server is.
If i take down the master, sentinel does everthing as expected promoting the slave to master so now the new master is on
127.0.0.1:6380
My question is how does my code know this and auto switch?