#include <Timer_Hash_T.h>
Public Types | |
typedef ACE_Timer_Queue_T< ACE_Event_Handler *, ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >, ACE_Null_Mutex > | TIMER_QUEUE |
Public Member Functions | |
ACE_Timer_Hash_Upcall (void) | |
ACE_Timer_Hash_Upcall (ACE_Timer_Queue_T< TYPE, FUNCTOR, ACE_LOCK > *timer_hash) | |
Constructor that specifies a Timer_Hash to call up to. | |
int | registration (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg) |
This method is called when a timer is registered. | |
int | preinvoke (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg, int recurring_timer, const ACE_Time_Value &cur_time, const void *&upcall_act) |
This method is called before the timer expires. | |
int | timeout (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg, int recurring_timer, const ACE_Time_Value &cur_time) |
This method is called when the timer expires. | |
int | postinvoke (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg, int recurring_timer, const ACE_Time_Value &cur_time, const void *upcall_act) |
This method is called after the timer expires. | |
int | cancel_type (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, int dont_call, int &requires_reference_counting) |
This method is called when a handler is cancelled. | |
int | cancel_timer (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, int dont_call, int requires_reference_counting) |
This method is called when a timer is cancelled. | |
int | deletion (TIMER_QUEUE &timer_queue, ACE_Event_Handler *handler, const void *arg) |
Private Member Functions | |
ACE_Timer_Hash_Upcall (const ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > &) | |
void | operator= (const ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > &) |
Private Attributes | |
ACE_Timer_Queue_T< TYPE, FUNCTOR, ACE_LOCK > * | timer_hash_ |
Timer Queue to do the calling up to. |
This class calls up to the Timer Hash's functor from the timer queues in the hash table
Definition at line 42 of file Timer_Hash_T.h.
typedef ACE_Timer_Queue_T<ACE_Event_Handler *, ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>, ACE_Null_Mutex> ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE |
Definition at line 48 of file Timer_Hash_T.h.
ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::ACE_Timer_Hash_Upcall | ( | void | ) |
Default constructor (creates an invalid object, but needs to be here so timer queues using this functor can be constructed)
Definition at line 63 of file Timer_Hash_T.cpp.
00064 : timer_hash_ (0) 00065 { 00066 // Nothing 00067 }
ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::ACE_Timer_Hash_Upcall | ( | ACE_Timer_Queue_T< TYPE, FUNCTOR, ACE_LOCK > * | timer_hash | ) |
Constructor that specifies a Timer_Hash to call up to.
Definition at line 72 of file Timer_Hash_T.cpp.
00074 : timer_hash_ (timer_hash) 00075 { 00076 // Nothing 00077 }
ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::ACE_Timer_Hash_Upcall | ( | const ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > & | ) | [private] |
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::cancel_timer | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
int | dont_call, | |||
int | requires_reference_counting | |||
) |
This method is called when a timer is cancelled.
Definition at line 147 of file Timer_Hash_T.cpp.
00152 { 00153 // Cancellation will be handled by the upcall functor of the timer 00154 // hash. 00155 return 0; 00156 }
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::cancel_type | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
int | dont_call, | |||
int & | requires_reference_counting | |||
) |
This method is called when a handler is cancelled.
Definition at line 135 of file Timer_Hash_T.cpp.
00140 { 00141 // Cancellation will be handled by the upcall functor of the timer 00142 // hash. 00143 return 0; 00144 }
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::deletion | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
const void * | arg | |||
) |
This method is called when the timer queue is destroyed and the timer is still contained in it
Definition at line 159 of file Timer_Hash_T.cpp.
References Hash_Token< TYPE >::act_, and ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::timer_hash_.
00163 { 00164 // Call up to the upcall functor of the timer hash since the timer 00165 // hash does not invoke deletion() on its upcall functor directly. 00166 Hash_Token<TYPE> *h = 00167 reinterpret_cast<Hash_Token<TYPE> *> (const_cast<void *> (arg)); 00168 00169 int result = 00170 this->timer_hash_->upcall_functor (). 00171 deletion (*this->timer_hash_, 00172 event_handler, 00173 h->act_); 00174 00175 return result; 00176 }
void ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::operator= | ( | const ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > & | ) | [private] |
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::postinvoke | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
const void * | arg, | |||
int | recurring_timer, | |||
const ACE_Time_Value & | cur_time, | |||
const void * | upcall_act | |||
) |
This method is called after the timer expires.
Definition at line 105 of file Timer_Hash_T.cpp.
References ACE_ASSERT.
00112 { 00113 // This method should never be invoked since we don't invoke 00114 // expire() on the buckets. 00115 ACE_ASSERT (0); 00116 return 0; 00117 }
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::preinvoke | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
const void * | arg, | |||
int | recurring_timer, | |||
const ACE_Time_Value & | cur_time, | |||
const void *& | upcall_act | |||
) |
This method is called before the timer expires.
Definition at line 91 of file Timer_Hash_T.cpp.
References ACE_ASSERT.
00097 { 00098 // This method should never be invoked since we don't invoke 00099 // expire() on the buckets. 00100 ACE_ASSERT (0); 00101 return 0; 00102 }
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::registration | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
const void * | arg | |||
) |
This method is called when a timer is registered.
Definition at line 80 of file Timer_Hash_T.cpp.
00084 { 00085 // Registration will be handled by the upcall functor of the timer 00086 // hash. 00087 return 0; 00088 }
int ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::timeout | ( | TIMER_QUEUE & | timer_queue, | |
ACE_Event_Handler * | handler, | |||
const void * | arg, | |||
int | recurring_timer, | |||
const ACE_Time_Value & | cur_time | |||
) |
This method is called when the timer expires.
Definition at line 121 of file Timer_Hash_T.cpp.
References ACE_ASSERT.
00127 { 00128 // This method should never be invoked since we don't invoke 00129 // expire() on the buckets. 00130 ACE_ASSERT (0); 00131 return 0; 00132 }
ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>* ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::timer_hash_ [private] |
Timer Queue to do the calling up to.
Definition at line 105 of file Timer_Hash_T.h.
Referenced by ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::deletion().