Timer_Queue.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Timer_Queue.h
00005  *
00006  *  $Id: Timer_Queue.h 71526 2006-03-14 06:14:35Z jtc $
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_TIMER_QUEUE_H
00012 #define TAO_Notify_TIMER_QUEUE_H
00013 #include /**/ "ace/pre.h"
00014 
00015 #include "orbsvcs/Notify/notify_serv_export.h"
00016 
00017 #include "orbsvcs/Notify/Timer.h"
00018 
00019 #include "ace/Timer_Queue.h"
00020 #include "ace/Timer_Heap.h"
00021 #include "ace/Recursive_Thread_Mutex.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class TAO_Notify_Timer_Queue
00031  *
00032  * @brief ACE_Timer_Queue based timer.
00033  *
00034  */
00035 class TAO_Notify_Serv_Export TAO_Notify_Timer_Queue : public TAO_Notify_Timer
00036 {
00037 public:
00038   typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_Timer_Queue > Ptr;
00039 
00040   /// Constuctor
00041   TAO_Notify_Timer_Queue (void);
00042 
00043   /// Destructor
00044   virtual ~TAO_Notify_Timer_Queue ();
00045 
00046 
00047   /// Schedule a timer
00048   virtual long schedule_timer (ACE_Event_Handler *handler,
00049                                const ACE_Time_Value &delay_time,
00050                                const ACE_Time_Value &interval);
00051 
00052   /// Cancel Timer
00053   virtual int cancel_timer (long timer_id);
00054 
00055   /// Get the native impl.
00056   ACE_Timer_Queue& impl (void);
00057 
00058 protected:
00059   /// The Timer Queue
00060   ACE_Timer_Heap timer_queue_;
00061 
00062 private:
00063   /// Release
00064   virtual void release (void);
00065 };
00066 
00067 TAO_END_VERSIONED_NAMESPACE_DECL
00068 
00069 #include /**/ "ace/post.h"
00070 #endif /* TAO_Notify_TIMER_QUEUE_H */

Generated on Sun Jan 27 15:40:02 2008 for TAO_CosNotification by doxygen 1.3.6