|
OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <ServiceEventDispatcher.h>


Public Member Functions | |
| ServiceEventDispatcher (size_t count=1) | |
| virtual | ~ServiceEventDispatcher () |
| void | shutdown (bool immediate=false) |
| bool | dispatch (EventBase_rch event) |
| long | schedule (EventBase_rch event, const MonotonicTimePoint &expiration=MonotonicTimePoint::now()) |
| size_t | cancel (long id) |
Public Member Functions inherited from OpenDDS::DCPS::EventDispatcher | |
| EventDispatcher () | |
| virtual | ~EventDispatcher () |
Public Member Functions inherited from OpenDDS::DCPS::RcObject | |
| virtual | ~RcObject () |
| virtual void | _add_ref () |
| virtual void | _remove_ref () |
| long | ref_count () const |
| WeakObject * | _get_weak_object () const |
Private Attributes | |
| ACE_Thread_Mutex | mutex_ |
| DispatchService_rch | dispatcher_ |
Additional Inherited Members | |
Protected Member Functions inherited from OpenDDS::DCPS::RcObject | |
| RcObject () | |
Definition at line 19 of file ServiceEventDispatcher.h.
|
explicit |
Create a ServiceEventDispatcher
| count | the requested size of the internal thread pool (see DispatchService) |
Definition at line 17 of file ServiceEventDispatcher.cpp.
|
virtual |
Definition at line 22 of file ServiceEventDispatcher.cpp.
References shutdown().
|
virtual |
Cancel a scheduled event dispatch.
| id | the id of the event timer to cancel |
Implements OpenDDS::DCPS::EventDispatcher.
Definition at line 75 of file ServiceEventDispatcher.cpp.
References OpenDDS::DCPS::RcObject::_remove_ref(), OpenDDS::DCPS::DispatchService::cancel(), dispatcher_, OpenDDS::DCPS::EventBase::handle_cancel(), mutex_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
virtual |
Dispatch an event.
| event | the event to dispatch |
Implements OpenDDS::DCPS::EventDispatcher.
Definition at line 47 of file ServiceEventDispatcher.cpp.
References OpenDDS::DCPS::DispatchService::dispatch(), dispatcher_, and mutex_.
|
virtual |
Schedule the future dispatch of an event.
| event | the event to dispatch |
| expiration | the requested dispatch time (no earlier than) |
Implements OpenDDS::DCPS::EventDispatcher.
Definition at line 61 of file ServiceEventDispatcher.cpp.
References dispatcher_, mutex_, and OpenDDS::DCPS::DispatchService::schedule().
|
virtual |
Request shutdown of this EventDispatcher, which prevents sucessful future calls to either dispatch or schedule and cancels all scheduled events.
| immediate | prevent any further dispatches from event queue, otherwise allow current queue to empty |
Implements OpenDDS::DCPS::EventDispatcher.
Definition at line 27 of file ServiceEventDispatcher.cpp.
References OpenDDS::DCPS::RcObject::_remove_ref(), dispatcher_, OpenDDS::DCPS::EventBase::handle_cancel(), mutex_, OpenDDS::DCPS::DispatchService::shutdown(), and OpenDDS::DCPS::RcHandle< T >::swap().
Referenced by ~ServiceEventDispatcher().
|
private |
Definition at line 39 of file ServiceEventDispatcher.h.
Referenced by cancel(), dispatch(), schedule(), and shutdown().
|
mutableprivate |
Definition at line 38 of file ServiceEventDispatcher.h.
Referenced by cancel(), dispatch(), schedule(), and shutdown().
1.8.13