diff options
author | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-30 23:53:09 +0000 |
---|---|---|
committer | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-30 23:53:09 +0000 |
commit | 7851b312bbd822b4e254cb25e40953f7d08f6c5d (patch) | |
tree | 0d01d0a23675116d12fc2669707f55cb3c56389f /ace/Message_Queue_T.cpp | |
parent | 92f1bf0cba14d7d73bd1a6542600f285097d8aae (diff) | |
download | ATCD-7851b312bbd822b4e254cb25e40953f7d08f6c5d.tar.gz |
added cleanup strategy factory methods
Diffstat (limited to 'ace/Message_Queue_T.cpp')
-rw-r--r-- | ace/Message_Queue_T.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp index 1fda2393cb5..a7249b52123 100644 --- a/ace/Message_Queue_T.cpp +++ b/ace/Message_Queue_T.cpp @@ -1142,6 +1142,33 @@ ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_deadline_message_queue (size_t template <ACE_SYNCH_DECL> ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> * +ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_deadline_cleanup_message_queue (size_t hwm, + size_t lwm, + ACE_Notification_Strategy *ns, + u_long static_bit_field_mask, + u_long static_bit_field_shift, + u_long pending_threshold, + u_long dynamic_priority_max, + u_long dynamic_priority_offset) +{ + ACE_Deadline_Cleanup_Message_Strategy *adcms; + + ACE_NEW_RETURN (adcms, + ACE_Deadline_Cleanup_Message_Strategy (static_bit_field_mask, + static_bit_field_shift, + pending_threshold, + dynamic_priority_max, + dynamic_priority_offset), + 0); + + return new ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> (*adcms, hwm, lwm, ns); +} + // factory method for a dynamically prioritized (by time to deadline) + // ACE_Dynamic_Message_Queue, with automatic cleanup of beyond late messages + + +template <ACE_SYNCH_DECL> +ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> * ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_laxity_message_queue (size_t hwm, size_t lwm, ACE_Notification_Strategy *ns, @@ -1167,4 +1194,30 @@ ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_laxity_message_queue (size_t hw // factory method for a dynamically prioritized (by laxity) ACE_Dynamic_Message_Queue +template <ACE_SYNCH_DECL> +ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> * +ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_laxity_cleanup_message_queue (size_t hwm, + size_t lwm, + ACE_Notification_Strategy *ns, + u_long static_bit_field_mask, + u_long static_bit_field_shift, + u_long pending_threshold, + u_long dynamic_priority_max, + u_long dynamic_priority_offset) +{ + ACE_Laxity_Message_Strategy *alcms; + + ACE_NEW_RETURN (alcms, + ACE_Laxity_Cleanup_Message_Strategy (static_bit_field_mask, + static_bit_field_shift, + pending_threshold, + dynamic_priority_max, + dynamic_priority_offset), + 0); + + return new ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> (*alcms, hwm, lwm, ns); +} + // factory method for a dynamically prioritized (by laxity) + // ACE_Dynamic_Message_Queue, with automatic cleanup of beyond late messages + #endif /* ACE_MESSAGE_QUEUE_T_C */ |