00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_EC_TPC_DISPATCHING_H
00013 #define TAO_EC_TPC_DISPATCHING_H
00014 #include "ace/pre.h"
00015
00016 #include "ace/Hash_Map_Manager_T.h"
00017 #include "ace/Null_Mutex.h"
00018
00019 #include "orbsvcs/Event/EC_Dispatching.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #include "orbsvcs/Event/EC_TPC_Dispatching_Task.h"
00026
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029 class TAO_EC_Event_Channel_Base;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class TAO_RTEvent_Serv_Export TAO_EC_TPC_Dispatching : public TAO_EC_Dispatching
00040 {
00041 public:
00042 TAO_EC_TPC_Dispatching (int nthreads,
00043 int thread_creation_flags,
00044 int thread_priority,
00045 int force_activate,
00046 TAO_EC_Queue_Full_Service_Object* so);
00047 ~TAO_EC_TPC_Dispatching ();
00048
00049
00050 virtual void activate (void);
00051 virtual void shutdown (void);
00052 virtual void push (TAO_EC_ProxyPushSupplier* proxy,
00053 RtecEventComm::PushConsumer_ptr consumer,
00054 const RtecEventComm::EventSet& event,
00055 TAO_EC_QOS_Info& qos_info);
00056 virtual void push_nocopy (TAO_EC_ProxyPushSupplier* proxy,
00057 RtecEventComm::PushConsumer_ptr consumer,
00058 RtecEventComm::EventSet& event,
00059 TAO_EC_QOS_Info& qos_info);
00060
00061 int add_consumer (RtecEventComm::PushConsumer_ptr consumer);
00062 int remove_consumer (RtecEventComm::PushConsumer_ptr consumer);
00063
00064 private:
00065
00066 ACE_Thread_Manager thread_manager_;
00067
00068
00069 int nthreads_;
00070
00071
00072
00073 int thread_creation_flags_;
00074
00075
00076 int thread_priority_;
00077
00078
00079
00080 int force_activate_;
00081
00082 typedef ACE_Hash_Map_Manager_Ex<RtecEventComm::PushConsumer_ptr,TAO_EC_Dispatching_Task*,ACE_Pointer_Hash<RtecEventComm::PushConsumer_ptr>,ACE_Equal_To<RtecEventComm::PushConsumer_ptr>,ACE_Null_Mutex> MAPTYPE;
00083
00084
00085
00086 MAPTYPE consumer_task_map_;
00087
00088
00089
00090
00091 TAO_SYNCH_MUTEX lock_;
00092
00093
00094 TAO_EC_Queue_Full_Service_Object* queue_full_service_object_;
00095
00096 };
00097
00098 TAO_END_VERSIONED_NAMESPACE_DECL
00099
00100 #include "ace/post.h"
00101 #endif