TAO_CosNotification 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TAO_Notify::Routing_Slip Class Reference

Class which manages the delivery of events to destination. More...

#include <Routing_Slip.h>

Inheritance diagram for TAO_Notify::Routing_Slip:
Inheritance graph
[legend]
Collaboration diagram for TAO_Notify::Routing_Slip:
Collaboration graph
[legend]

Public Member Functions

void set_rspm (Routing_Slip_Persistence_Manager *rspm)
 
void reconnect ()
 
virtual ~Routing_Slip ()
 Destructor (should be private but that inspires compiler wars)
 
void route (TAO_Notify_ProxyConsumer *pc, bool reliable_channel)
 
void dispatch (TAO_Notify_ProxySupplier *proxy_supplier, bool filter)
 Schedule delivery to a consumer via a proxy supplier.
 
void wait_persist ()
 Wait until the event/routing_slip has been saved at least once.
 
void delivery_request_complete (size_t request_id)
 A delivery request has been satisfied.
 
void at_front_of_persist_queue ()
 This Routing_Slip reached the front of the persistence queue.
 
virtual void persist_complete ()
 The persistent storage has completed the last request.
 
const TAO_Notify_Event::Ptrevent () const
 
int sequence () const
 Provide an identifying number for this Routing Slip to use in debug messages.
 
bool should_retry () const
 Should delivery of this event be retried if it fails?
 
- Public Member Functions inherited from TAO_Notify::Persistent_Callback
virtual ~Persistent_Callback ()
 

Static Public Member Functions

static Routing_Slip_Ptr create (const TAO_Notify_Event::Ptr &event)
 "Factory" method for normal use.
 
static Routing_Slip_Ptr create (TAO_Notify_EventChannelFactory &ecf, Routing_Slip_Persistence_Manager *rspm)
 "Factory" method for use during reload from persistent storage.
 

Private Types

enum  State {
  rssCREATING , rssTRANSIENT , rssRELOADED , rssNEW ,
  rssCOMPLETE_WHILE_NEW , rssSAVING , rssSAVED , rssUPDATING ,
  rssCHANGED_WHILE_SAVING , rssCHANGED , rssCOMPLETE , rssDELETING ,
  rssTERMINAL
}
 
typedef ACE_Guard< TAO_SYNCH_MUTEXRouting_Slip_Guard
 

Private Member Functions

void enter_state_transient (Routing_Slip_Guard &guard)
 
void continue_state_transient (Routing_Slip_Guard &guard)
 
void enter_state_reloaded (Routing_Slip_Guard &guard)
 
void enter_state_new (Routing_Slip_Guard &guard)
 
void continue_state_new (Routing_Slip_Guard &guard)
 
void enter_state_complete_while_new (Routing_Slip_Guard &guard)
 
void enter_state_saving (Routing_Slip_Guard &guard)
 
void enter_state_saved (Routing_Slip_Guard &guard)
 
void enter_state_updating (Routing_Slip_Guard &guard)
 
void enter_state_changed_while_saving (Routing_Slip_Guard &guard)
 
void continue_state_changed_while_saving (Routing_Slip_Guard &guard)
 
void enter_state_changed (Routing_Slip_Guard &guard)
 
void continue_state_changed (Routing_Slip_Guard &guard)
 
void enter_state_complete (Routing_Slip_Guard &guard)
 
void enter_state_deleting (Routing_Slip_Guard &guard)
 
void enter_state_terminal (Routing_Slip_Guard &guard)
 
bool create_persistence_manager ()
 
 Routing_Slip (const TAO_Notify_Event::Ptr &event)
 Private constructor for use by create method.
 
bool all_deliveries_complete () const
 Test to see if all deliveries are complete.
 
void add_to_persist_queue (Routing_Slip_Guard &guard)
 This routing_slip needs to be saved.
 
void marshal (TAO_OutputCDR &cdr)
 Marshal into a CDR.
 
bool unmarshal (TAO_Notify_EventChannelFactory &ecf, TAO_InputCDR &rscdr)
 Marshal from CDR.
 

Private Attributes

TAO_SYNCH_MUTEX internals_
 Protection for internal information.
 
bool is_safe_
 true when event persistence qos is guaranteed
 
ACE_SYNCH_CONDITION until_safe_
 signalled when is_safe_ goes true
 
Routing_Slip_Ptr this_ptr_
 
TAO_Notify_Event::Ptr event_
 
enum TAO_Notify::Routing_Slip::State state_
 
Delivery_Request_Vec delivery_requests_
 A collection of delivery requests.
 
Delivery_Method_Vec delivery_methods_
 Methods that should be restarted during event recovery.
 
size_t complete_requests_
 How many delivery requests are complete.
 
Routing_Slip_Persistence_Managerrspm_
 Pointer to a Routing_Slip_Persistence_Manager.
 
int sequence_
 

Static Private Attributes

static TAO_SYNCH_MUTEX sequence_lock_
 
static int routing_slip_sequence_ = 0
 
static size_t count_enter_transient_ = 0
 
static size_t count_continue_transient_ = 0
 
static size_t count_enter_reloaded_ = 0
 
static size_t count_enter_new_ = 0
 
static size_t count_continue_new_ = 0
 
static size_t count_enter_complete_while_new_ = 0
 
static size_t count_enter_saving_ = 0
 
static size_t count_enter_saved_ = 0
 
static size_t count_enter_updating_ = 0
 
static size_t count_enter_changed_while_saving_ = 0
 
static size_t count_continue_changed_while_saving_ = 0
 
static size_t count_enter_changed_ = 0
 
static size_t count_continue_changed_ = 0
 
static size_t count_enter_complete_ = 0
 
static size_t count_enter_deleting_ = 0
 
static size_t count_enter_terminal_ = 0
 
static Routing_Slip_Queue persistent_queue_
 

Detailed Description

Class which manages the delivery of events to destination.

Interacts with persistent storage to provide reliable delivery.

Member Typedef Documentation

◆ Routing_Slip_Guard

Member Enumeration Documentation

◆ State

A mini-state machine to control persistence See external doc for circles and arrows.

Enumerator
rssCREATING 
rssTRANSIENT 
rssRELOADED 
rssNEW 
rssCOMPLETE_WHILE_NEW 
rssSAVING 
rssSAVED 
rssUPDATING 
rssCHANGED_WHILE_SAVING 
rssCHANGED 
rssCOMPLETE 
rssDELETING 
rssTERMINAL 

Constructor & Destructor Documentation

◆ ~Routing_Slip()

TAO_Notify::Routing_Slip::~Routing_Slip ( )
virtual

Destructor (should be private but that inspires compiler wars)

◆ Routing_Slip()

TAO_Notify::Routing_Slip::Routing_Slip ( const TAO_Notify_Event::Ptr & event)
private

Private constructor for use by create method.

Member Function Documentation

◆ add_to_persist_queue()

void TAO_Notify::Routing_Slip::add_to_persist_queue ( Routing_Slip_Guard & guard)
private

This routing_slip needs to be saved.

◆ all_deliveries_complete()

bool TAO_Notify::Routing_Slip::all_deliveries_complete ( ) const
private

Test to see if all deliveries are complete.

◆ at_front_of_persist_queue()

void TAO_Notify::Routing_Slip::at_front_of_persist_queue ( )

This Routing_Slip reached the front of the persistence queue.

◆ continue_state_changed()

void TAO_Notify::Routing_Slip::continue_state_changed ( Routing_Slip_Guard & guard)
private

◆ continue_state_changed_while_saving()

void TAO_Notify::Routing_Slip::continue_state_changed_while_saving ( Routing_Slip_Guard & guard)
private

◆ continue_state_new()

void TAO_Notify::Routing_Slip::continue_state_new ( Routing_Slip_Guard & guard)
private

◆ continue_state_transient()

void TAO_Notify::Routing_Slip::continue_state_transient ( Routing_Slip_Guard & guard)
private

◆ create() [1/2]

Routing_Slip_Ptr TAO_Notify::Routing_Slip::create ( const TAO_Notify_Event::Ptr & event)
static

"Factory" method for normal use.

◆ create() [2/2]

Routing_Slip_Ptr TAO_Notify::Routing_Slip::create ( TAO_Notify_EventChannelFactory & ecf,
Routing_Slip_Persistence_Manager * rspm )
static

"Factory" method for use during reload from persistent storage.

◆ create_persistence_manager()

bool TAO_Notify::Routing_Slip::create_persistence_manager ( )
private

◆ delivery_request_complete()

void TAO_Notify::Routing_Slip::delivery_request_complete ( size_t request_id)

A delivery request has been satisfied.

◆ dispatch()

void TAO_Notify::Routing_Slip::dispatch ( TAO_Notify_ProxySupplier * proxy_supplier,
bool filter )

Schedule delivery to a consumer via a proxy supplier.

Parameters
proxy_supplierthe proxy supplier that will deliver the event
filtershould consumer-based filtering be applied?

◆ enter_state_changed()

void TAO_Notify::Routing_Slip::enter_state_changed ( Routing_Slip_Guard & guard)
private

◆ enter_state_changed_while_saving()

void TAO_Notify::Routing_Slip::enter_state_changed_while_saving ( Routing_Slip_Guard & guard)
private

◆ enter_state_complete()

void TAO_Notify::Routing_Slip::enter_state_complete ( Routing_Slip_Guard & guard)
private

◆ enter_state_complete_while_new()

void TAO_Notify::Routing_Slip::enter_state_complete_while_new ( Routing_Slip_Guard & guard)
private

◆ enter_state_deleting()

void TAO_Notify::Routing_Slip::enter_state_deleting ( Routing_Slip_Guard & guard)
private

◆ enter_state_new()

void TAO_Notify::Routing_Slip::enter_state_new ( Routing_Slip_Guard & guard)
private

◆ enter_state_reloaded()

void TAO_Notify::Routing_Slip::enter_state_reloaded ( Routing_Slip_Guard & guard)
private

◆ enter_state_saved()

void TAO_Notify::Routing_Slip::enter_state_saved ( Routing_Slip_Guard & guard)
private

◆ enter_state_saving()

void TAO_Notify::Routing_Slip::enter_state_saving ( Routing_Slip_Guard & guard)
private

◆ enter_state_terminal()

void TAO_Notify::Routing_Slip::enter_state_terminal ( Routing_Slip_Guard & guard)
private

◆ enter_state_transient()

void TAO_Notify::Routing_Slip::enter_state_transient ( Routing_Slip_Guard & guard)
private

◆ enter_state_updating()

void TAO_Notify::Routing_Slip::enter_state_updating ( Routing_Slip_Guard & guard)
private

◆ event()

const TAO_Notify_Event::Ptr & TAO_Notify::Routing_Slip::event ( ) const

◆ marshal()

void TAO_Notify::Routing_Slip::marshal ( TAO_OutputCDR & cdr)
private

Marshal into a CDR.

◆ persist_complete()

void TAO_Notify::Routing_Slip::persist_complete ( )
virtual

The persistent storage has completed the last request.

Implements TAO_Notify::Persistent_Callback.

◆ reconnect()

void TAO_Notify::Routing_Slip::reconnect ( )

◆ route()

void TAO_Notify::Routing_Slip::route ( TAO_Notify_ProxyConsumer * pc,
bool reliable_channel )

Route this event to destinations must be the Action request after the routing slip is created.

◆ sequence()

int TAO_Notify::Routing_Slip::sequence ( ) const

Provide an identifying number for this Routing Slip to use in debug messages.

◆ set_rspm()

void TAO_Notify::Routing_Slip::set_rspm ( Routing_Slip_Persistence_Manager * rspm)

◆ should_retry()

bool TAO_Notify::Routing_Slip::should_retry ( ) const

Should delivery of this event be retried if it fails?

◆ unmarshal()

bool TAO_Notify::Routing_Slip::unmarshal ( TAO_Notify_EventChannelFactory & ecf,
TAO_InputCDR & rscdr )
private

Marshal from CDR.

◆ wait_persist()

void TAO_Notify::Routing_Slip::wait_persist ( )

Wait until the event/routing_slip has been saved at least once.

Member Data Documentation

◆ complete_requests_

size_t TAO_Notify::Routing_Slip::complete_requests_
private

How many delivery requests are complete.

◆ count_continue_changed_

size_t TAO_Notify::Routing_Slip::count_continue_changed_ = 0
staticprivate

◆ count_continue_changed_while_saving_

size_t TAO_Notify::Routing_Slip::count_continue_changed_while_saving_ = 0
staticprivate

◆ count_continue_new_

size_t TAO_Notify::Routing_Slip::count_continue_new_ = 0
staticprivate

◆ count_continue_transient_

size_t TAO_Notify::Routing_Slip::count_continue_transient_ = 0
staticprivate

◆ count_enter_changed_

size_t TAO_Notify::Routing_Slip::count_enter_changed_ = 0
staticprivate

◆ count_enter_changed_while_saving_

size_t TAO_Notify::Routing_Slip::count_enter_changed_while_saving_ = 0
staticprivate

◆ count_enter_complete_

size_t TAO_Notify::Routing_Slip::count_enter_complete_ = 0
staticprivate

◆ count_enter_complete_while_new_

size_t TAO_Notify::Routing_Slip::count_enter_complete_while_new_ = 0
staticprivate

◆ count_enter_deleting_

size_t TAO_Notify::Routing_Slip::count_enter_deleting_ = 0
staticprivate

◆ count_enter_new_

size_t TAO_Notify::Routing_Slip::count_enter_new_ = 0
staticprivate

◆ count_enter_reloaded_

size_t TAO_Notify::Routing_Slip::count_enter_reloaded_ = 0
staticprivate

◆ count_enter_saved_

size_t TAO_Notify::Routing_Slip::count_enter_saved_ = 0
staticprivate

◆ count_enter_saving_

size_t TAO_Notify::Routing_Slip::count_enter_saving_ = 0
staticprivate

◆ count_enter_terminal_

size_t TAO_Notify::Routing_Slip::count_enter_terminal_ = 0
staticprivate

◆ count_enter_transient_

size_t TAO_Notify::Routing_Slip::count_enter_transient_ = 0
staticprivate

◆ count_enter_updating_

size_t TAO_Notify::Routing_Slip::count_enter_updating_ = 0
staticprivate

◆ delivery_methods_

Delivery_Method_Vec TAO_Notify::Routing_Slip::delivery_methods_
private

Methods that should be restarted during event recovery.

◆ delivery_requests_

Delivery_Request_Vec TAO_Notify::Routing_Slip::delivery_requests_
private

A collection of delivery requests.

◆ event_

TAO_Notify_Event::Ptr TAO_Notify::Routing_Slip::event_
private

◆ internals_

TAO_SYNCH_MUTEX TAO_Notify::Routing_Slip::internals_
private

Protection for internal information.

◆ is_safe_

bool TAO_Notify::Routing_Slip::is_safe_
private

true when event persistence qos is guaranteed

◆ persistent_queue_

Routing_Slip_Queue TAO_Notify::Routing_Slip::persistent_queue_
staticprivate

◆ routing_slip_sequence_

int TAO_Notify::Routing_Slip::routing_slip_sequence_ = 0
staticprivate

◆ rspm_

Routing_Slip_Persistence_Manager* TAO_Notify::Routing_Slip::rspm_
private

◆ sequence_

int TAO_Notify::Routing_Slip::sequence_
private

◆ sequence_lock_

TAO_SYNCH_MUTEX TAO_Notify::Routing_Slip::sequence_lock_
staticprivate

◆ state_

enum TAO_Notify::Routing_Slip::State TAO_Notify::Routing_Slip::state_
private

◆ this_ptr_

Routing_Slip_Ptr TAO_Notify::Routing_Slip::this_ptr_
private

Smart pointer to this object Provides continuity between smart pointers and "Routing_Slip::this" Also lets the Routing_Slip manage its own minimum lifetime.

◆ until_safe_

ACE_SYNCH_CONDITION TAO_Notify::Routing_Slip::until_safe_
private

signalled when is_safe_ goes true


The documentation for this class was generated from the following files: