Previous Table of Contents Next


23.3.8 ObjectGroupManager


   The ObjectGroupManager interface provides operations that allow an application to exercise control over the addition, removal and locations of members of an object group and to obtain the current reference and identifier for an object group.

   module FT { interface ObjectGroupManager { ObjectGroup create_member(in ObjectGroup object_group, in Location the_location,

   in TypeId type_id, in Criteria the_criteria)

   raises(ObjectGroupNotFound, MemberAlreadyPresent, NoFactory, ObjectNotCreated, InvalidCriteria, CannotMeetCriteria);

   ObjectGroup add_member(in ObjectGroup object_group, in Location the_location, in Object member)

   raises(ObjectGroupNotFound, MemberAlreadyPresent, ObjectNotAdded);

   ObjectGroup remove_member(in ObjectGroup object_group, in Location the_location)

   raises(ObjectGroupNotFound, MemberNotFound); PrimaryNotSet, BadReplicationStyle);

   Locations locations_of_members(in ObjectGroup object_group) raises(ObjectGroupNotFound);

   ObjectGroupId get_object_group_id(in ObjectGroup object_group) raises(ObjectGroupNotFound);

   ObjectGroup get_object_group_ref(in ObjectGroup object_group) raises(ObjectGroupNotFound);

   Object get_member_ref(in ObjectGroup object_group, in Location loc) raises(ObjectGroupNotFound, MemberNotFound); }; };

   23.3.8.1 Operations

   create_member

   The create_member() operation allows the application to exercise explicit control over the creation of a member of an object group, and to determine where the member is created.

   ObjectGroup create_member(in ObjectGroup object_group, in Location the_location, in TypeId type_id, in Criteria the_criteria)

   raises(ObjectGroupNotFound, MemberAlreadyPresent, NoFactory, ObjectNotCreated, InvalidCriteria, CannotMeetCriteria);

   Parameters

object_group The object group reference for the object group to which the member is to be added.
the_location The physical location; that is, a fault containment region, host, cluster of hosts, etc. at which the new member is to be created. There is at most one member of an object group at each location.
type_id The repository identifier for the type of the object.
the_criteria Parameters to be passed to the factory, which the factory evaluates before creating the object. The criteria are implementation-specific and are not defined in this specification. Examples of criteria are initialization values, constraints on the member, etc. The criteria passed in as a parameter to create_member(), if any, override the criteria set in the FactoryInfos property of the given object group for the given location.

   Return Value

   The object group reference of the object group with the member added. This reference may be the same as that passed in as a parameter.

   Raises

   ObjectGroupNotFound if the object group is not found by the Replication Manager.

   MemberAlreadyPresent if a member of the object group already exists at the given location.

   NoFactory if the Replication Manager cannot find a factory that is capable of constructing a member of the object group with the given type_id and at the given location.

   ObjectNotCreated if the factory or the Replication Manager cannot create the member and add it to the object group.

   InvalidCriteria if the factory does not understand the criteria.

   CannotMeetCriteria if the factory understands the criteria but cannot satisfy it.

   add_member

   The add_member() operation allows an application to exercise explicit control over the addition of an existing object to an object group at a particular location.

   ObjectGroup add_member(in ObjectGroup object_group,in Location the_location,in Object member)

   raises(ObjectGroupNotFound,MemberAlreadyPresent,ObjectNotAdded);

   Parameters

object_group The object group reference of the object group to which the existing object is to be added.
the_location The physical location; that is, a fault containment region, host, cluster of hosts, etc. of the object to be added. There is at most one member of an object group at each location.
member The reference of the object to be added.

   Return Value

   The object group reference for the object group with the object added. This reference may be the same as that passed in as a parameter.

   Raises

   ObjectGroupNotFound if the object group is not found by the ReplicationManager.

   MemberAlreadyPresent if a member of the object group already exists at the given location.

   ObjectNotAdded if the Replication Manager cannot add the object to the object group.

   remove_member

   The remove_member() operation allows an application to exercise explicit control over the removal of a member from an object group at a particular location.

   If the application invoked the create_object() operation of the GenericFactory interface to create the member object and used the add_member() operation to add the object to the object group, when the application invokes remove_member(), the Replication Manager removes the member from the group but does not delete it. Deletion of the object is the responsibility of the application.

   If the application invoked the create_member() operation to create the member object, when the application invokes the remove_member() operation to remove the member from the object group, the Replication Manager first removes the member from the object group and then invokes the delete_object() operation of the GenericFactory interface to delete the object.

   If the Replication Manager invoked the create_object() operation of the GenericFactory interface to create the member object, when the application invokes the remove_member() operation to remove the member, the Replication Manager first removes the member from the group and then invokes the delete_object() operation of the GenericFactory interface to delete the object.

   If the MembershipStyle is MEMB_INF_CTRL, the application invokes the remove_member() operation and the number of members of the object group falls below the MinimumNumberReplicas, then the Replication Manager starts up a new member at another location.

   ObjectGroup remove_member(in ObjectGroup object_group, in Location the_location) raises(ObjectGroupNotFound, MemberNotFound};

   Parameters

object_group The object group reference of the object group from which the member is to be removed.
the_location The physical location; that is, a fault containment region, host, cluster of hosts, etc. of the member to be removed.

   Return Value

   The object group reference for the object group with the member removed. Thisreference may be the same as that passed in as a parameter.

   Raises

   ObjectGroupNotFound if the object group is not found by the ReplicationManager.

   MemberNotFound if the Replication Manager cannot find a member of the object group at the given location.

   set_primary_member

   The set_primary_member() operation allows the application to exercise explicit control over the selection of the member of the object group that is to be the primary.

   ObjectGroup set_primary_member(in ObjectGroup object_group,in Location the_location)raises(ObjectGroupNotFound,

   MemberNotFound, PrimaryNotSet, BadReplicationStyle)

   Parameters

object_group The object group reference of the object group whose primary is to be determined.
the_location The physical location of the member that is to become the primary.

   Return Value

   The object group reference of the object group with the primary member at the given location. This reference may be the same as that passed in as a parameter.

   Raises

   ObjectGroupNotFound if the object group is not found by the ReplicationManager.

   MemberNotFound if the Replication Manager cannot find a member of the object group at that location.

   PrimaryNotSet if the Replication Manager cannot set the primary member of the object group.

   BadReplicationStyle if the ReplicationStyle of the given group is notCOLD_PASSIVE or WARM_PASSIVE.

   locations_of_members

   The locations_of_members() operation allows the application to determine the locations of the members of the given object group, and the location of the primary member of the group.

   Locations locations_of_members(in ObjectGroup object_group)raises(ObjectGroupNotFound);

   Parameters


   Return Value

   A sequence of locations at which the members of the object group currently exist. If the object group has the COLD_PASSIVE or WARM_PASSIVE Replication Style, the first location in the sequence is the location of the primary.

   Raises

   ObjectGroupNotFound if the object group is not found by the ReplicationManager.

   get_object_group_id

   The get_object_group_id() operation takes a reference for an object group as an in parameter, and returns the identifier of the object group.

   ObjectGroupId get_object_group_id(in ObjectGroup object_group)raises(ObjectGroupNotFound);

   Parameters


   Return Value

   The object group identifier for the object group.

   Raises

   ObjectGroupNotFound if the object group is not found by the ReplicationManager.

   get_object_group_ref

   The get_object_group_ref() operation takes a reference for an object group as an in parameter, and returns the current reference for the object group.

   ObjectGroup get_object_group_ref(in ObjectGroup object_group)raises(ObjectGroupNotFound);

   Parameters


   Return Value

   The current object group reference for the object group. The returned reference may be the same as the reference passed in as a parameter.

   Raises

   ObjectGroupNotFound if the object group is not found by the ReplicationManager.

   get_member_ref

   The get_member_ref() operation takes a reference for an object group and a location as in parameters, and returns a reference for the member.

   Object get_member_ref(in ObjectGroup object_group, in Location loc) raises(ObjectGroupNotFound, MemberNotFound);

   Parameters


   Return Value

   The reference for the member.

   Raises

   ObjectGroupNotFound if the object group is not found by the Replication Manager.

   MemberNotFound if the member is not found by the Replication Manager.