1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
|
.TH ACE_Timer_Heap_T 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Timer_Heap_T \- Provides a very fast and predictable timer implementation.
.SH SYNOPSIS
.br
.PP
\fC#include <Timer_Heap_T.h>\fR
.PP
Inherits \fBACE_Timer_Queue_T< TYPE,FUNCTOR,ACE_LOCK >\fR.
.PP
.SS Public Types
.in +1c
.ti -1c
.RI "typedef \fBACE_Timer_Heap_Iterator_T\fR<TYPE, FUNCTOR, ACE_LOCK> \fBHEAP_ITERATOR\fR"
.br
.ti -1c
.RI "typedef \fBACE_Timer_Queue_T\fR<TYPE, FUNCTOR, ACE_LOCK> \fBINHERITED\fR"
.br
.in -1c
.SS Public Methods
.in +1c
.ti -1c
.RI "\fBACE_Timer_Heap_T\fR (size_t size, int preallocated = 0, FUNCTOR *upcall_functor = 0, \fBACE_Free_List\fR<\fBACE_Timer_Node_T\fR <TYPE> > *freelist = 0)"
.br
.ti -1c
.RI "\fBACE_Timer_Heap_T\fR (FUNCTOR *upcall_functor = 0, \fBACE_Free_List\fR<\fBACE_Timer_Node_T\fR <TYPE> > *freelist = 0)"
.br
.ti -1c
.RI "virtual \fB~ACE_Timer_Heap_T\fR (void)"
.br
.RI "\fIDestructor.\fR"
.ti -1c
.RI "virtual int \fBis_empty\fR (void) const"
.br
.RI "\fITrue if heap is empty, else false.\fR"
.ti -1c
.RI "virtual const \fBACE_Time_Value\fR& \fBearliest_time\fR (void) const"
.br
.RI "\fIReturns the time of the earliest node in the Timer_Queue. Must be called on a non-empty queue.\fR"
.ti -1c
.RI "virtual long \fBschedule\fR (const TYPE &type, const void *act, const \fBACE_Time_Value\fR &delay, const \fBACE_Time_Value\fR &interval = \fBACE_Time_Value::zero\fR)"
.br
.ti -1c
.RI "virtual int \fBreset_interval\fR (long timer_id, const \fBACE_Time_Value\fR &interval)"
.br
.ti -1c
.RI "virtual int \fBcancel\fR (const TYPE &type, int dont_call_handle_close = 1)"
.br
.ti -1c
.RI "virtual int \fBcancel\fR (long timer_id, const void **act = 0, int dont_call_handle_close = 1)"
.br
.ti -1c
.RI "virtual \fBACE_Timer_Queue_Iterator_T\fR<TYPE, FUNCTOR, ACE_LOCK>& \fBiter\fR (void)"
.br
.RI "\fIReturns a pointer to this 's iterator.\fR"
.ti -1c
.RI "\fBACE_Timer_Node_T\fR<TYPE>* \fBremove_first\fR (void)"
.br
.RI "\fIRemoves the earliest node from the queue and returns it. Note that the timer is removed from the heap, but is not freed, and its ID is not reclaimed. The caller is responsible for calling either \fCreschedule\fR or \fCfree_node\fR after this function returns. Thus, this function is for support of \fCACE_Timer_Queue::expire\fR and should not be used unadvisedly in other conditions.\fR"
.ti -1c
.RI "virtual void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.ti -1c
.RI "virtual \fBACE_Timer_Node_T\fR<TYPE>* \fBget_first\fR (void)"
.br
.RI "\fIReads the earliest node from the queue and returns it.\fR"
.in -1c
.SS Protected Methods
.in +1c
.ti -1c
.RI "virtual void \fBreschedule\fR (\fBACE_Timer_Node_T\fR<TYPE> *)"
.br
.RI "\fIReschedule an "interval" .\fR"
.ti -1c
.RI "virtual \fBACE_Timer_Node_T\fR<TYPE>* \fBalloc_node\fR (void)"
.br
.RI "\fIFactory method that allocates a new node (uses operator new if we're *not* preallocating, otherwise uses an internal freelist).\fR"
.ti -1c
.RI "virtual void \fBfree_node\fR (\fBACE_Timer_Node_T\fR<TYPE> *)"
.br
.in -1c
.SS Private Methods
.in +1c
.ti -1c
.RI "\fBACE_Timer_Node_T\fR<TYPE>* \fBremove\fR (size_t slot)"
.br
.RI "\fIRemove and return the <slot>th and restore the heap property.\fR"
.ti -1c
.RI "void \fBinsert\fR (\fBACE_Timer_Node_T\fR<TYPE> *new_node)"
.br
.RI "\fIInsert <new_node> into the heap and restore the heap property.\fR"
.ti -1c
.RI "void \fBgrow_heap\fR (void)"
.br
.ti -1c
.RI "void \fBreheap_up\fR (\fBACE_Timer_Node_T\fR<TYPE> *new_node, size_t slot, size_t parent)"
.br
.RI "\fIRestore the heap property, starting at <slot>.\fR"
.ti -1c
.RI "void \fBreheap_down\fR (\fBACE_Timer_Node_T\fR<TYPE> *moved_node, size_t slot, size_t child)"
.br
.RI "\fIRestore the heap property, starting at <slot>.\fR"
.ti -1c
.RI "void \fBcopy\fR (int slot, \fBACE_Timer_Node_T\fR<TYPE> *moved_node)"
.br
.RI "\fICopy <moved_node> into the <slot> slot of <heap_> and move <slot> into the corresponding slot in the <timer_id_> array.\fR"
.ti -1c
.RI "int \fBtimer_id\fR (void)"
.br
.ti -1c
.RI "int \fBpop_freelist\fR (void)"
.br
.RI "\fIPops and returns a new timer id from the freelist.\fR"
.ti -1c
.RI "void \fBpush_freelist\fR (int old_id)"
.br
.RI "\fIPushes <old_id> onto the freelist.\fR"
.ti -1c
.RI "\fBACE_Timer_Heap_T\fR (const ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &)"
.br
.ti -1c
.RI "void \fBoperator=\fR (const ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &)"
.br
.in -1c
.SS Private Attributes
.in +1c
.ti -1c
.RI "size_t \fBmax_size_\fR"
.br
.RI "\fIMaximum size of the heap.\fR"
.ti -1c
.RI "size_t \fBcur_size_\fR"
.br
.RI "\fICurrent size of the heap.\fR"
.ti -1c
.RI "size_t \fBcur_limbo_\fR"
.br
.RI "\fINumber of heap entries in transition (removed from the queue, but not freed) and may be rescheduled or freed.\fR"
.ti -1c
.RI "\fBHEAP_ITERATOR\fR* \fBiterator_\fR"
.br
.RI "\fIIterator used to expire timers.\fR"
.ti -1c
.RI "\fBACE_Timer_Node_T\fR<TYPE>** \fBheap_\fR"
.br
.ti -1c
.RI "long* \fBtimer_ids_\fR"
.br
.ti -1c
.RI "size_t \fBtimer_ids_curr_\fR"
.br
.RI "\fI"Pointer" to the element in the <timer_ids_> array that was last given out as a timer ID.\fR"
.ti -1c
.RI "size_t \fBtimer_ids_min_free_\fR"
.br
.RI "\fIIndex representing the lowest timer ID that has been freed. When the timer_ids_next_ value wraps around, it starts back at this point.\fR"
.ti -1c
.RI "\fBACE_Timer_Node_T\fR<TYPE>* \fBpreallocated_nodes_\fR"
.br
.ti -1c
.RI "\fBACE_Timer_Node_T\fR<TYPE>* \fBpreallocated_nodes_freelist_\fR"
.br
.RI "\fIThis points to the head of the <preallocated_nodes_> freelist, which is organized as a stack.\fR"
.ti -1c
.RI "\fBACE_Unbounded_Set\fR<\fBACE_Timer_Node_T\fR<TYPE> *> \fBpreallocated_node_set_\fR"
.br
.RI "\fISet of pointers to the arrays of preallocated timer nodes. Used to delete the allocated memory when required.\fR"
.in -1c
.SS Friends
.in +1c
.ti -1c
.RI "class \fBACE_Timer_Heap_Iterator_T< TYPE,FUNCTOR,ACE_LOCK >\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP
.SS template<class TYPE, class FUNCTOR, class ACE_LOCK> template class ACE_Timer_Heap_T
Provides a very fast and predictable timer implementation.
.PP
.PP
This implementation uses a heap-based callout queue of absolute times. Therefore, in the average and worst case, scheduling, canceling, and expiring timers is O(log N) (where N is the total number of timers). In addition, we can also preallocate as many \fC\fBACE_Timer_Node\fR\fR objects as there are slots in the heap. This allows us to completely remove the need for dynamic memory allocation, which is important for real-time systems.
.PP
.SH MEMBER TYPEDEF DOCUMENTATION
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> typedef \fBACE_Timer_Heap_Iterator_T\fR<TYPE, FUNCTOR, ACE_LOCK> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::HEAP_ITERATOR
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> typedef \fBACE_Timer_Queue_T\fR<TYPE, FUNCTOR, ACE_LOCK> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::INHERITED
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> (size_t size, int preallocated = 0, FUNCTOR * upcall_functor = 0, \fBACE_Free_List\fR< \fBACE_Timer_Node_T\fR< TYPE > >* freelist = 0)
.PP
The Constructor creates a heap with specified number of elements. This can also take in a upcall functor and freelist (if 0, then defaults will be created).
.PP
\fBParameters: \fR
.in +1c
.TP
\fB\fIsize\fR\fR size_t, the maximum number of timers that can be inserted into the new object.
.TP
\fB\fIpreallocated\fR\fR int (default 0), if non-0 then all the memory for the \fC\fBACE_Timer_Node\fR\fR objects will be pre-allocated. This saves time and is more predictable (though it requires more space). Otherwise, timer nodes are allocated as needed.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> (FUNCTOR * upcall_functor = 0, \fBACE_Free_List\fR< \fBACE_Timer_Node_T\fR< TYPE > >* freelist = 0)
.PP
Default constructor. \fCupcall_functor\fR is the instance of the FUNCTOR to be used by the queue. If \fCupcall_functor\fR is 0, Timer Heap will create a default FUNCTOR. \fCfreelist\fR is the freelist of timer nodes. If 0, then a default freelist will be created. The default size will be ACE_DEFAULT_TIMERS and there will be no preallocation.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> (void)\fC [virtual]\fR
.PP
Destructor.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> (const ACE_Timer_Heap_T< TYPE,FUNCTOR,ACE_LOCK >&)\fC [private]\fR
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >* ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::alloc_node (void)\fC [protected, virtual]\fR
.PP
Factory method that allocates a new node (uses operator new if we're *not* preallocating, otherwise uses an internal freelist).
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> int ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (long timer_id, const void ** act = 0, int dont_call_handle_close = 1)\fC [virtual]\fR
.PP
Cancel the single timer that matches the <timer_id> value (which was returned from the <schedule> method). If act is non-NULL then it will be set to point to the ``magic cookie'' argument passed in when the timer was registered. This makes it possible to free up the memory and avoid memory leaks. If <dont_call> is 0 then the <functor> will be invoked. Returns 1 if cancellation succeeded and 0 if the <timer_id> wasn't found.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> int ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (const TYPE & type, int dont_call_handle_close = 1)\fC [virtual]\fR
.PP
Cancel all timer associated with <type>. If <dont_call> is 0 then the <functor> will be invoked. Returns number of timers cancelled.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::copy (int slot, \fBACE_Timer_Node_T\fR< TYPE >* moved_node)\fC [private]\fR
.PP
Copy <moved_node> into the <slot> slot of <heap_> and move <slot> into the corresponding slot in the <timer_id_> array.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const\fC [virtual]\fR
.PP
Dump the state of an object.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> const \fBACE_Time_Value\fR & ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::earliest_time (void) const\fC [virtual]\fR
.PP
Returns the time of the earliest node in the Timer_Queue. Must be called on a non-empty queue.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::free_node (\fBACE_Timer_Node_T\fR< TYPE >*)\fC [protected, virtual]\fR
.PP
Factory method that frees a previously allocated node (uses operator delete if we're *not* preallocating, otherwise uses an internal freelist).
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >* ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::get_first (void)\fC [virtual]\fR
.PP
Reads the earliest node from the queue and returns it.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::grow_heap (void)\fC [private]\fR
.PP
Doubles the size of the heap and the corresponding timer_ids array. If preallocation is used, will also double the size of the preallocated array of ACE_Timer_Nodes.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::insert (\fBACE_Timer_Node_T\fR< TYPE >* new_node)\fC [private]\fR
.PP
Insert <new_node> into the heap and restore the heap property.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> int ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::is_empty (void) const\fC [virtual]\fR
.PP
True if heap is empty, else false.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Queue_Iterator_T\fR< TYPE,FUNCTOR,ACE_LOCK >& ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::iter (void)\fC [virtual]\fR
.PP
Returns a pointer to this 's iterator.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::operator= (const ACE_Timer_Heap_T< TYPE,FUNCTOR,ACE_LOCK >&)\fC [private]\fR
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> int ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::pop_freelist (void)\fC [private]\fR
.PP
Pops and returns a new timer id from the freelist.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::push_freelist (int old_id)\fC [private]\fR
.PP
Pushes <old_id> onto the freelist.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reheap_down (\fBACE_Timer_Node_T\fR< TYPE >* moved_node, size_t slot, size_t child)\fC [private]\fR
.PP
Restore the heap property, starting at <slot>.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reheap_up (\fBACE_Timer_Node_T\fR< TYPE >* new_node, size_t slot, size_t parent)\fC [private]\fR
.PP
Restore the heap property, starting at <slot>.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >* ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::remove (size_t slot)\fC [private]\fR
.PP
Remove and return the <slot>th and restore the heap property.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >* ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::remove_first (void)\fC [virtual]\fR
.PP
Removes the earliest node from the queue and returns it. Note that the timer is removed from the heap, but is not freed, and its ID is not reclaimed. The caller is responsible for calling either \fCreschedule\fR or \fCfree_node\fR after this function returns. Thus, this function is for support of \fCACE_Timer_Queue::expire\fR and should not be used unadvisedly in other conditions.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> void ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reschedule (\fBACE_Timer_Node_T\fR< TYPE >*)\fC [protected, virtual]\fR
.PP
Reschedule an "interval" .
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> int ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reset_interval (long timer_id, const \fBACE_Time_Value\fR & interval)\fC [virtual]\fR
.PP
Resets the interval of the timer represented by <timer_id> to <interval>, which is specified in relative time to the current <gettimeofday>. If <interval> is equal to , the timer will become a non-rescheduling timer. Returns 0 if successful, -1 if not.
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> long ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::schedule (const TYPE & type, const void * act, const \fBACE_Time_Value\fR & delay, const \fBACE_Time_Value\fR & interval = \fBACE_Time_Value::zero\fR)\fC [virtual]\fR
.PP
Schedule a timer that may optionally auto-reset. Schedule <type> that will expire after <delay> amount of time, which is specified in absolute time. If it expires then is passed in as the value to the <functor>. If <interval> is != to then it is used to reschedule the <type> automatically, using relative time to the current <gettimeofday>. This method returns a <timer_id> that uniquely identifies the the <type> entry in an internal list. This <timer_id> can be used to cancel the timer before it expires. The cancellation ensures that <timer_ids> are unique up to values of greater than 2 billion timers. As long as timers don't stay around longer than this there should be no problems with accidentally deleting the wrong timer. Returns -1 on failure (which is guaranteed never to be a valid <timer_id>).
.PP
Reimplemented from \fBACE_Timer_Queue_T\fR.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> int ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::timer_id (void)\fC [private]\fR
.PP
Returns a timer id that uniquely identifies this timer. This id can be used to cancel a timer via the <cancel (int)> method. The timer id returned from this method will never == -1 to avoid conflicts with other failure return values.
.SH FRIENDS AND RELATED FUNCTION DOCUMENTATION
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> class \fBACE_Timer_Heap_Iterator_T\fR\fC [friend]\fR
.PP
.SH MEMBER DATA DOCUMENTATION
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> size_t ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::cur_limbo_\fC [private]\fR
.PP
Number of heap entries in transition (removed from the queue, but not freed) and may be rescheduled or freed.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> size_t ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::cur_size_\fC [private]\fR
.PP
Current size of the heap.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >** ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::heap_\fC [private]\fR
.PP
Current contents of the Heap, which is organized as a "heap" of *'s. In this context, a heap is a "partially ordered, almost complete" binary tree, which is stored in an array.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBHEAP_ITERATOR\fR * ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::iterator_\fC [private]\fR
.PP
Iterator used to expire timers.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> size_t ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::max_size_\fC [private]\fR
.PP
Maximum size of the heap.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Unbounded_Set\fR< \fBACE_Timer_Node_T\fR< TYPE >*> ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::preallocated_node_set_\fC [private]\fR
.PP
Set of pointers to the arrays of preallocated timer nodes. Used to delete the allocated memory when required.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >* ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::preallocated_nodes_\fC [private]\fR
.PP
If this is non-0, then we preallocate <max_size_> number of objects in order to reduce dynamic allocation costs. In auto-growing implementation, this points to the last array of nodes allocated.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> \fBACE_Timer_Node_T\fR< TYPE >* ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::preallocated_nodes_freelist_\fC [private]\fR
.PP
This points to the head of the <preallocated_nodes_> freelist, which is organized as a stack.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> long * ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::timer_ids_\fC [private]\fR
.PP
An array of "pointers" that allows each in the <heap_> to be located in O(1) time. Basically, <timer_id_[i]> contains the slot in the <heap_> array where an * with timer id \fI resides. Thus, the timer id passed back from <schedule> is really a slot into the <timer_ids> array. The <timer_ids_> array serves two purposes: negative values are indications of free timer IDs, whereas positive values are "pointers" into the <heap_> array for assigned timer IDs.
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> size_t ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::timer_ids_curr_\fC [private]\fR
.PP
"Pointer" to the element in the <timer_ids_> array that was last given out as a timer ID.
.PP
.SS template<classTYPE, classFUNCTOR, classACE_LOCK> size_t ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::timer_ids_min_free_\fC [private]\fR
.PP
Index representing the lowest timer ID that has been freed. When the timer_ids_next_ value wraps around, it starts back at this point.
.PP
.SH AUTHOR
.PP
Generated automatically by Doxygen for ACE from the source code.
|