Class NodeAddress


  • public class NodeAddress
    extends java.lang.Object
    Represents the address and port of a node in the cluster or in standalone installation.
    Example:
    
     NodeAddress address1 = NodeAddress.builder().build(); // default parameters: localhost:6379
     NodeAddress address2 = NodeAddress.builder().port(6380).build(); // localhost:6380
     NodeAddress address2 = NodeAddress.builder().address("my.cloud.com").port(12345).build(); // custom address
     
    • Field Detail

      • DEFAULT_PORT

        public static final java.lang.Integer DEFAULT_PORT
    • Method Detail

      • getHost

        @NonNull
        public @NonNull java.lang.String getHost()
      • getPort

        @NonNull
        public @NonNull java.lang.Integer getPort()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object