removeDirector() - trillium_quality - 17.1

Trillium Director SDK Reference Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Version
17.1
Language
English
Product name
Trillium Quality
Title
Trillium Director SDK Reference Guide
Topic type
Administration
Overview
How Do I
Configuration
Reference
Installation
First publish date
2008

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