| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_PORT_NO
Used as the default port number if the port number is not mentioned. |
| private final InetAddress | hostAddress
Contains the IP Address of the slave to replicate to. |
| private final int | portNumber
Contains the port number at which the slave is listening for connections from the master. |
| Access | Constructor and Description |
|---|---|
| public | SlaveAddress(String
a hostName, int String that contains the host name of
the slave.an portNumber)int that contains the port number
of the slave.Constructor initializes the host name and the port number with valid values. |
| Modifier and Type | Method and Description |
|---|---|
| public InetAddress | Returns: an IP Address corresponding to the slave host name.Used to get the IP Address corresponding to the host name of the slave. |
| public int | Returns: an int representing the value of the port number of the slave.Used to get the port number of the slave. |
| DEFAULT_PORT_NO | back to summary |
|---|---|
| public static final int DEFAULT_PORT_NO Used as the default port number if the port number is not mentioned. Port number 4851 is registered for Derby Replication at IANA (See: http://www.iana.org/assignments/port-numbers) | |
| hostAddress | back to summary |
|---|---|
| private final InetAddress hostAddress Contains the IP Address of the slave to replicate to. | |
| portNumber | back to summary |
|---|---|
| private final int portNumber Contains the port number at which the slave is listening for connections from the master. | |
| SlaveAddress | back to summary |
|---|---|
| public SlaveAddress(String hostName, int portNumber) throws UnknownHostException Constructor initializes the host name and the port number with valid values. If a valid host name or port number is not provided then these are initialized to default values.
| |
| getHostAddress | back to summary |
|---|---|
| public InetAddress getHostAddress() Used to get the IP Address corresponding to the host name of the slave.
| |
| getPortNumber | back to summary |
|---|---|
| public int getPortNumber() Used to get the port number of the slave.
| |