Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TNotification
Inherited By:
None.
Purpose:
Transports a group of notifications to a receiver as a single batch notification. The notifications in the batch notification can be distributed individually by calling DispatchNotifications. The receiver can bracket the dispatch of the notifications with whatever handling is required for the notifications as a group.
A better name for TBatchNotification might be TCollectionOf_TNotificationInterestPair_Notification because a batch notification actually maintains a collection of notification/interest pairs. These notification/interest pairs are:
A notification to be distributed to receivers.
An interest. This interest is used to match all receivers connected by the batch's notifier connection.
A notifier that is in batch mode initially creates an TBatchNotification and adds the first notification to the batch notification. When the notifier is taken out of batch mode, it sends all of the batch notifications off.
Instantiation:
Always allocate on the heap.
Deriving Classes:
This class is not intended for deriving.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TBatchNotification (TNotifierConnection * theConnection)
- TBatchNotification (const TBatchNotification &)
- TBatchNotification ()
Interface Category:
API.
Purpose:
- Creates a batch notification with no contained notifications.
- Copy constructor.
- Default constructor.
Calling Context:
- Call this function directly.
- Called to copy an object. Call this function directly.
- Called by the stream-in operators and directly.
Parameters:
- TNotifierConnection * theConnection -The connection that will be used to distribute the notifications if the DispatchNotifications member function is called.
- const TBatchNotification & -The other notification to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TBatchNotification ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
static const TInterest & GetBatchInterest ()
Interface Category:
API.
Purpose:
Allows clients to get a TInterest with the associated TToken a kBatchNotification token.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a TInterest( kBatchNotification ).
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBatchNotification::DispatchNotifications
virtual void DispatchNotifications () const
Interface Category:
API.
Purpose:
Uses the NotificationConnection with which it was created, to distribute its batched up notifications.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AddLast (TNotificationInterestPair *)
Interface Category:
API.
Purpose:
Adds a notification and a dispatching interest pair to the list of notifications to be dispatched.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBatchNotification::CreateNotificationIterator
TIteratorOver < TNotificationInterestPair > * CreateNotificationIterator () const
Interface Category:
API.
Purpose:
Used by clients of TBatchNotification to iterate over all of its notifications and dispatching interests.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a iterator over the batch's collection of notification/interest pairs.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
unsigned long Count () const
Interface Category:
API.
Purpose:
Determines how many notification/interest pairs that the batch notification contains.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the number of notification/interest pairs that the batch contains.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TBatchNotification & operator =(const TBatchNotification &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object. Call this function directly.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Generates a hash value for use by collections.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the hash value for the batch notification.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data. Call this function directly.
Parameters:
- TStream & -The stream the object streams itself out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data. Call this function directly.
Parameters:
- TStream & -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.