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 81422 2008-04-24 12:33:29Z johnnyw $
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   /// Constructor
00041   TAO_Notify_Timer_Queue (void);
00042 
00043   /// Destructor
00044   virtual ~TAO_Notify_Timer_Queue (void);
00045 
00046   /// Schedule a timer
00047   virtual long schedule_timer (ACE_Event_Handler *handler,
00048                                const ACE_Time_Value &delay_time,
00049                                const ACE_Time_Value &interval);
00050 
00051   /// Cancel Timer
00052   virtual int cancel_timer (long timer_id);
00053 
00054   /// Get the native impl.
00055   ACE_Timer_Queue& impl (void);
00056 
00057 protected:
00058   /// The Timer Queue
00059   ACE_Timer_Heap timer_queue_;
00060 
00061 private:
00062   /// Release
00063   virtual void release (void);
00064 };
00065 
00066 TAO_END_VERSIONED_NAMESPACE_DECL
00067 
00068 #include /**/ "ace/post.h"
00069 #endif /* TAO_Notify_TIMER_QUEUE_H */

Generated on Tue Feb 2 17:45:29 2010 for TAO_CosNotification by  doxygen 1.4.7