Priority Property (CollectiveMember object)



This read-write property is a long representing the order in which to select collective member servers when connection preferences and availability of members don’t override the choice.



The object placeholder is an object expression that evaluates to a CollectiveMember object.


When the connection preference used in an application is set to "Any" or if set to "PreferPrimary" and the primary is unavailable, the priority determines the choice of collective member server for a connection attempt. By setting priorities appropriately on user workstations, and running HA aware applications that use "Any" as a connection preference, the load on a collective can be distributed among its members.

The values of this property are initialized to a value of 1 for each member of a collective when the collective is first added to the SDK, or when a member server is first added to an existing collective. Users can customize the property value to any positive integer to establish their preferred connection order such that the highest priority members are given a priority of 1 and increasing priority values (2,3,4…) signify decreasing priority order. A priority value of -1 indicates connections to that member are not allowed. A priority of 0 is undefined and not a valid priority. When multiple members share the same priority, then one of the members is randomly chosen for a connection, unless one of the members is primary, in which case a connection to the primary member is always attempted first.

Enabling Operational Intelligence