PICollective Class
- Last UpdatedNov 18, 2025
- 7 minute read
- PI System
- AF SDK 2024 R2
- Developer

Inheritance Hierarchy
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public sealed class PICollective : AFObject, IAFChangedEvent, IEquatable<PICollective>
<SerializableAttribute> Public NotInheritable Class PICollective Inherits AFObject Implements IAFChangedEvent, IEquatable(Of PICollective) Dim instance As PICollective
[SerializableAttribute] public ref class PICollective sealed : public AFObject, IAFChangedEvent, IEquatable<PICollective^>
[<SealedAttribute>] [<SerializableAttribute>] type PICollective = class inherit AFObject interface IAFChangedEvent interface IEquatable<PICollective> end
The PICollective type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| AllowWriteValues |
Indicates whether values are allowed to be written to the currently active collective member.
| |
| ConnectedMemberType |
Indicates the role of the currently connected collective member.
| |
| CurrentMember |
The current active collective member.
| |
| ID |
Read-only property that provides a unique identifier for the object to be used for
quick access that is not dependent upon the index.
(Inherited from AFObject.) | |
| Identity |
This read-only property contains identity of the object.
(Inherited from AFObject.) | |
| IsDeleted |
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.) | |
| Members |
The collection of PICollectiveMember objects that are configured
for the PICollective.
| |
| PIServer |
This read-only property allows access to the PIServer associated with this
object.
| |
| PISystem |
This read-only property allows access to the PISystem associated with this
object.
(Inherited from AFObject.) | |
| UniqueID |
Read-only property that provides the collective's unique identifier as a String.
(Overrides AFObjectUniqueID.) |
Methods
| Name | Description | |
|---|---|---|
| CompareTo(Object) |
Compares this instance with a specified Object.
(Inherited from AFObject.) | |
| CompareTo(AFObject) |
Compares this instance with a specified AFObject.
(Inherited from AFObject.) | |
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.) | |
| Equals(AFObject) |
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.) | |
| Equals(PICollective) |
Indicates whether the current object is equal to another object of the same type.
| |
| FindPrimary |
Finds the primary member of the collective.
| |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Inherited from AFObject.) | |
| GetPath |
Returns the full path to the object, using just the names.
(Inherited from AFObject.) | |
| GetPath(AFObject) |
Returns the path to the object relative from another object.
(Inherited from AFObject.) | |
| GetPath(AFEncodeType, AFObject) |
Returns the path to the object relative from another object,
using the name and/or id as specified
by encodeType.
(Inherited from AFObject.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| Persist |
This method returns the persistence string for the object.
(Inherited from AFObject.) | |
| SwitchMember(AFConnectionPreference) |
The SwitchMember method is used to change the currently connected
member of the collective using default credentials.
| |
| SwitchMember(PICollectiveMember) |
The SwitchMember method is used to change to the specified
member of the collective using default credentials.
| |
| SwitchMember(NetworkCredential, AFConnectionPreference) |
The SwitchMember method is used to change the currently connected
member of the collective using the specified PI User credentials.
| |
| SwitchMember(NetworkCredential, PICollectiveMember) |
The SwitchMember method is used to change to the specified
member of the collective using the specified PI User credentials.
| |
| SwitchMember(Boolean, IWin32Window, AFConnectionPreference) |
The SwitchMember method is used to change the currently connected
member of the collective with a credential prompt if necessary.
| |
| SwitchMember(Boolean, IWin32Window, PICollectiveMember) |
The SwitchMember method is used to change to the specified
member of the collective with a credential prompt if necessary.
| |
| SwitchMember(NetworkCredential, PIAuthenticationMode, AFConnectionPreference) |
The SwitchMember method is used to change the currently connected
member of the collective using the specified credentials.
| |
| SwitchMember(NetworkCredential, PIAuthenticationMode, PICollectiveMember) |
The SwitchMember method is used to change to the specified
member of the collective using the specified credentials.
| |
| ToString |
Returns a String that represents the current object.
(Overrides AFObjectToString.) |
Events
| Name | Description | |
|---|---|---|
| Changed |
Event is raised when the object or one of its sub-objects is changed.
|
Remarks
A PIServer collective is a group of physical PIServers (member servers) that maintain consistent configuration. A collective is accessed by a PIServer object that represents the entire collective. When a program is connected to a collective and its connection to a particular member is lost, the AF SDK will failover to another member in the collective. This behavior supports high availability of data stored in AF.
PIServer access functions are intended to work seamlessly between server collectives and single servers. However, the PIServer collective members have some behaviors that may vary between the members. The choice of member server during a connection may be influenced through the AFConnectionInfo.Preference property and properties of the PICollectiveMember. If a call is made to a method which is only supported on the primary, and the current member is a secondary, the AF SDK will attempt to open a connection to the primary for the duration of the call. The connected member will not be switched, however.
A connection to a specific server can be created using one of the PICollectiveMember.Connect Overload methods. In this case, the AF SDK will not dynamically switch the connection if a call is made to a method not supported on the member (for example, creating or modifying a point definition on a secondary)..
| This method, property, or class is not available in the legacy .NET 3.5 version of the SDK. |