Reselect Primary App

Type

SwitchKit API message

Description

Use the SK_ReselectPrimaryApp message to indicate to the LLC that the primary application should be selected for a specific Redundant Application Pool (RAP). By default, the first application to connect to the LLC is the primary application. You can change which application is designated as primary, using the appropriate variable. After receiving this message, the LLC looks at all members of a RAP and selects a new primary application for the RAP. The Flag field dictates the behavior of this command as described in the arguments table further on this page.

If the LLC selects a new primary application, all members of the specific RAP are notified about the change in status, including the indication.

The SK_ReselectPrimaryAppAck is the response to the initial SK_ReselectPrimaryApp message, and it indicates the success or failure of the reselect.

Sent by

Application

Arguments

The following table shows the arguments that you can modify:

Argument

Description

RedundantAppPoolID

The RedundantAppPoolID is a string that uniquely identifies the class of application wishing to be treated as redundant applications.

Notes: RAP IDs are case sensitive!

Flag

The Flag indicates the reselect behavior.

• SK_RED_RESELECT_DEFAULT (0) - Execute primary selection algorithm using priority. The application with the highest priority is selected as primary. No change is made if the value of the current primary is equal to or higher than of all other applications.

• SK_RED_RESELCT_PRIMARY (1) - The requesting application should be made primary. The Application must be a member of the RAP and cannot be a monitor of that RAP.

• SK_RED_RESELCT_SECONDARY (2) - the requesting application should be made secondary. If the application is already secondary, this request has no impact on the RAP.

Status

The Status is the result of the original request. A status of zero (0) indicates a success. Any other value indicates an error.

C Structure

typedef struct {

char RedundantAppPoolID[32];

int Flag;

UBYTE reserved53[217]

} SK_ReselectPrimaryApp;

C Structure Response

typedef struct {

int Status;

UBYTE reserved21[4];

char RedundantAppPoolID[32];

UBYTE reserved57[213]

} SK_ReselectPrimaryAppAck;

C++ Class

class SKC_ReselectPrimaryApp : public SKC_ToolkitMessage {

public:

const char *getRedundantAppPoolID() const;

void setRedundantAppPoolID(const char *x);

int getFlag() const;

void setFlag(int x);

};

C++ Class Response

class SKC_ReselectPrimaryAppAck : public SKC_ToolkitAck {

public:

int getStatus() const;

void setStatus(int x);

const char *getRedundantAppPoolID() const;

void setRedundantAppPoolID(const char *x);

};