OpenDDS
Snapshot(2023/04/28-20:55)
dds
DCPS
ServiceEventDispatcher.h
Go to the documentation of this file.
1
/*
2
*
3
*
4
* Distributed under the OpenDDS License.
5
* See: http://www.opendds.org/license.html
6
*/
7
8
#ifndef OPENDDS_DCPS_SERVICE_EVENT_DISPATCHER_H
9
#define OPENDDS_DCPS_SERVICE_EVENT_DISPATCHER_H
10
11
#include "
EventDispatcher.h
"
12
#include "
DispatchService.h
"
13
14
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
15
16
namespace
OpenDDS
{
17
namespace
DCPS {
18
19
class
OpenDDS_Dcps_Export
ServiceEventDispatcher
:
public
EventDispatcher
{
20
public
:
21
/**
22
* Create a ServiceEventDispatcher
23
* @param count the requested size of the internal thread pool (see DispatchService)
24
*/
25
explicit
ServiceEventDispatcher
(
size_t
count = 1);
26
virtual
~
ServiceEventDispatcher
();
27
28
void
shutdown
(
bool
immediate =
false
);
29
30
bool
dispatch(
EventBase_rch
event);
31
32
long
schedule(
EventBase_rch
event,
const
MonotonicTimePoint
& expiration =
MonotonicTimePoint::now
());
33
34
size_t
cancel(
long
id
);
35
36
private
:
37
38
mutable
ACE_Thread_Mutex
mutex_
;
39
DispatchService_rch
dispatcher_
;
40
};
41
typedef
RcHandle<ServiceEventDispatcher>
ServiceEventDispatcher_rch
;
42
43
}
// DCPS
44
}
// OpenDDS
45
46
OPENDDS_END_VERSIONED_NAMESPACE_DECL
47
48
#endif // OPENDDS_DCPS_SERVICE_EVENT_DISPATCHER_H
ACE_Thread_Mutex
OpenDDS::DCPS::ServiceEventDispatcher::mutex_
ACE_Thread_Mutex mutex_
Definition:
ServiceEventDispatcher.h:38
OpenDDS_Dcps_Export
#define OpenDDS_Dcps_Export
Definition:
dcps_export.h:24
OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now
static TimePoint_T< MonotonicClock > now()
Definition:
TimePoint_T.inl:41
OpenDDS::DCPS::ServiceEventDispatcher::dispatcher_
DispatchService_rch dispatcher_
Definition:
ServiceEventDispatcher.h:39
EventDispatcher.h
OpenDDS::DCPS::EventDispatcher
Definition:
EventDispatcher.h:106
OpenDDS::DCPS::ServiceEventDispatcher
Definition:
ServiceEventDispatcher.h:19
DispatchService.h
OpenDDS::DCPS::TimePoint_T< MonotonicClock >
OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
Definition:
Versioned_Namespace.h:48
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
Definition:
Hash.cpp:17
shutdown
int shutdown(ACE_HANDLE handle, int how)
OpenDDS
The Internal API and Implementation of OpenDDS.
Definition:
AddressCache.h:28
OpenDDS::DCPS::ServiceEventDispatcher_rch
RcHandle< ServiceEventDispatcher > ServiceEventDispatcher_rch
Definition:
ServiceEventDispatcher.h:41
OpenDDS::DCPS::RcHandle
Definition:
RcHandle_T.h:24
Generated by
1.8.13