addDirector() - trillium_quality - 17.2

Trillium Director SDK Reference Guide

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

The addDirector() method adds a Director to the internal list of Directors that can be used to process requests. Directors are accessed in round-robin order, providing load balancing. If one Director becomes unavailable, the next Director in the list is used, resulting in an automatic failover for Directors.

Syntax

int addDirector (String strHost, int nPort, char cProtocol,
             boolean bInFront);

Parameters

Name

Type

Use

Length

Description

strHost

String

In

n*

The host name or the IP address of the Director host machine.

nPort

int

In

4

The port number of the Director. The range is 0-65535.

cProtocol

char

In

1

Specifies which transport layer protocol is used. Supported protocols are T (TCP) and U (UDP).

bInFront

boolean

In

1

True = Add the Director to the front of the internal list.

False = Add the Director to the end of the internal list.

n* indicates maximum allowable file path and name length for the operating system on which the program runs.

Return Values

A returned value of 0 indicates that the Director was successfully added. For any non-zero returned value, refer to Return Values for a description of the error.

Example

int nRC;
nRC = addAddDirector(“10.70.245.11”, 1960, ‘T’, true);
This example will add the Director with the IP address of 10.70.245.11 and the port number of 1960 to the beginning of the internal list of Directors.
Before After
10.70.245.10, 1950, T 10.70.245.11, 1960, T
10.70.245.90, 1970, U 10.70.245.10, 1950, T
10.70.245.45, 1980, T 10.70.245.90, 1970, U
  10.70.245.45, 1980, T