ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > Class Template Reference

Functor for Timer_Hash. More...

#include <Timer_Hash_T.h>

List of all members.

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.


Detailed Description

template<class TYPE, class FUNCTOR, class ACE_LOCK>
class ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >

Functor for Timer_Hash.

This class calls up to the Timer Hash's functor from the timer queues in the hash table

Definition at line 40 of file Timer_Hash_T.h.


Member Typedef Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 46 of file Timer_Hash_T.h.

Referenced by ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::cancel_timer(), ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::cancel_type(), ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::deletion(), ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::postinvoke(), ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::preinvoke(), ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::registration(), and ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::timeout().


Constructor & Destructor Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 43 of file Timer_Hash_T.cpp.

00044   : timer_hash_ (0)
00045 {
00046   // Nothing
00047 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 52 of file Timer_Hash_T.cpp.

00053   : timer_hash_ (timer_hash)
00054 {
00055   // Nothing
00056 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::ACE_Timer_Hash_Upcall const ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > &   )  [private]
 


Member Function Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 122 of file Timer_Hash_T.cpp.

References ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00126 {
00127   // Cancellation will be handled by the upcall functor of the timer
00128   // hash.
00129   return 0;
00130 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 111 of file Timer_Hash_T.cpp.

References ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00115 {
00116   // Cancellation will be handled by the upcall functor of the timer
00117   // hash.
00118   return 0;
00119 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 133 of file Timer_Hash_T.cpp.

References Hash_Token< TYPE >::act_, ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::timer_hash_, and ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00136 {
00137   // Call up to the upcall functor of the timer hash since the timer
00138   // hash does not invoke deletion() on its upcall functor directly.
00139   Hash_Token<TYPE> *h =
00140     reinterpret_cast<Hash_Token<TYPE> *> (const_cast<void *> (arg));
00141 
00142   int result =
00143     this->timer_hash_->upcall_functor ().
00144     deletion (*this->timer_hash_,
00145               event_handler,
00146               h->act_);
00147 
00148   delete h;
00149 
00150   return result;
00151 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
void ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::operator= const ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK > &   )  [private]
 

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 83 of file Timer_Hash_T.cpp.

References ACE_ASSERT, and ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00089 {
00090   // This method should never be invoked since we don't invoke
00091   // expire() on the buckets.
00092   ACE_ASSERT (0);
00093   return 0;
00094 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 69 of file Timer_Hash_T.cpp.

References ACE_ASSERT, and ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00075 {
00076   // This method should never be invoked since we don't invoke
00077   // expire() on the buckets.
00078   ACE_ASSERT (0);
00079   return 0;
00080 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 59 of file Timer_Hash_T.cpp.

References ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00062 {
00063   // Registration will be handled by the upcall functor of the timer
00064   // hash.
00065   return 0;
00066 }

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 98 of file Timer_Hash_T.cpp.

References ACE_ASSERT, and ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::TIMER_QUEUE.

00103 {
00104   // This method should never be invoked since we don't invoke
00105   // expire() on the buckets.
00106   ACE_ASSERT (0);
00107   return 0;
00108 }


Member Data Documentation

template<class TYPE, class FUNCTOR, class ACE_LOCK>
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 103 of file Timer_Hash_T.h.

Referenced by ACE_Timer_Hash_Upcall< TYPE, FUNCTOR, ACE_LOCK >::deletion().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 12:58:49 2008 for ACE by doxygen 1.3.6