removeDirector() - trillium_quality - Latest

Trillium Director SDK Reference

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Version
Latest
ft:locale
en-US
Product name
Trillium Quality
ft:title
Trillium Director SDK Reference
Copyright
2024
First publish date
2008
ft:lastEdition
2024-10-18
ft:lastPublication
2024-10-18T15:24:49.097000

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);
This example removes the second occurrence of the Director with the IP address of 10.70.245.11 and port number of 1960 from the list of Directors.
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