public class RedisServerInfo extends Object implements ServerInfo, Comparable<RedisServerInfo>
| Constructor and Description |
|---|
RedisServerInfo(String connectionString)
Creates a RedisServerInfo Object from a Connection String.
|
RedisServerInfo(String phost,
int pport)
Creates a RedisServerInfo Object with 0 as the DB Index.
|
RedisServerInfo(String phost,
int pport,
int pdbIndex)
Creates a RedisServerInfo Object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(RedisServerInfo o) |
boolean |
equals(Object o) |
String |
getConnectionString()
Gets the Connection String in the form of host:port so that it does not have to be constructed
each time.
|
int |
getDbIndex() |
String |
getHost()
Gets the host.
|
int |
getPort()
Gets the port.
|
String |
getRedisConnectionString() |
int |
getServerIndex()
Gets an index identifying the server.
|
int |
hashCode() |
public RedisServerInfo(String phost, int pport, int pdbIndex)
phost - Server hostpport - Server portpdbIndex - DB Index to usepublic RedisServerInfo(String phost, int pport)
phost - Server hostpport - Server portpublic RedisServerInfo(String connectionString)
connectionString - Connection Stringpublic int compareTo(RedisServerInfo o)
compareTo in interface Comparable<RedisServerInfo>public String getHost()
ServerInfogetHost in interface ServerInfopublic int getPort()
ServerInfogetPort in interface ServerInfopublic int getDbIndex()
public String getConnectionString()
ServerInfogetConnectionString in interface ServerInfopublic int getServerIndex()
ServerInfogetServerIndex in interface ServerInfopublic String getRedisConnectionString()
Copyright © 2013- Suresh Mahalingam. All Rights Reserved.