Class: TStandardCaucusPauseMessage

Declaration: StandardCaucus.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TStandardCaucusPauseMessage is used to send a pause message to a caucus. The client sends a pause message by creating a TStandardCaucusPauseMessage object, streaming data into it, and destroying the object. To resume the caucus, send a TStandardCaucusResumeMessage. Pausing means any messages sent after the pause message are queued internally. Only after a resume are the pending messages released. Pausing allows a member to synchronize shared data among members. A member sending a pause message knows all messages have been received when that member receives its own pause message. Only the member who sent the original pause message can resume. Additional pause messages sent by other members are queued with all other messages until the first pause is resumed. Join and Leave messages are also be queued if the caucus is paused. A member that has paused the caucus should send a resume message before leaving the caucus. TStandardCaucusPauseMessage and TStandardCaucusResumeMessage should always be constructed on the stack. There is no limit on the size of the message that can be sent. Zero-byte messages are allowed.

Instantiation:

Always allocate on the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TStandardCaucusPauseMessage::TStandardCaucusPauseMessage

TStandardCaucusPauseMessage (TStandardCaucusMember * memberAlias)

Interface Category:

API.

Purpose:

Creates a new TStandardCaucusPauseMessage to send a message for the specified member. Initiates the pause operation.

Calling Context:

Called by the caucus member sending the pause message.

Parameters:

Return Value:

None.

Exceptions:

Throws TCaucusException::kNotInCaucus if the member has not joined or is not longer a member of the caucus. All others are passed through.

Concurrency:

Multithread safe.

Other Considerations:

Always allocate on stack.

Member Function: TStandardCaucusPauseMessage::~TStandardCaucusPauseMessage

~ TStandardCaucusPauseMessage ()

Interface Category:

API.

Purpose:

Destructor. Completes the pause message (for example, calls the member's EndPause member function). A member sending a pause message knows all messages have been received when that member receives its own pause message.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws TCaucusException::kNotInCaucus if the member has not joined or is not longer a member of the caucus. All others are passed through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardCaucusPauseMessage::operatorTStream&

operator TStream & () const

Interface Category:

API.

Purpose:

Returns the stream used to send the message.

Calling Context:

You do not need to call this function directly. The compiler should generate a stream conversion operator for you when you stream data into this object.

Parameters:

Return Value:

Returns the stream used to send the message.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

There might be times when you need to explicitly call this conversion operator directly (for example, if the compiler doesn't or cannot do it for you).
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.