The removeDirector() method removes a Director from the list of Directors that can be used for failover.
Syntax
int removeDirector (String strHost, int nPort, short nItemNum);
Parameters
Name |
Type |
Use |
Length |
Description |
---|---|---|---|---|
strHost |
String |
In |
n* |
The host definition of the Director. It can be either the host name or the IP address. |
nPort |
int |
In |
4 |
The port number of the Director. The range is 0-65535. |
nItemNum |
short |
In |
2 |
Specifies which Director to remove if there are multiple Directors with the same host name and port number. If the number specified is greater than the number of Directors with the same name, then the last one will be removed. If the value is 0, it will be treated as a 1. |
n* indicates that the length depends on the platform on which the program runs.
Return Values
A returned value of 0 indicates that the Director was successfully removed. For any non-zero returned value, refer to Return Values for a description of the error.
Example
int nRC;
nRC = removeDirector(“10.70.245.11”, 1960, 2);
Before | After |
10.70.245.11, 1960, T |
10.70.245.11, 1960, T |
10.70.245.90, 1970, U | 10.70.245.90, 1970, U |
10.70.245.11, 1960, T |
10.70.245.45, 1980, T |
10.70.245.45, 1980, T |