#include <Standard_Event_Persistence.h>
Inheritance diagram for TAO_Notify::Standard_Event_Persistence_Factory:
Definition at line 39 of file Standard_Event_Persistence.h.
|
Constructor.
Definition at line 115 of file Standard_Event_Persistence.cpp.
00116 : allocator_() 00117 , root_(this) 00118 , psb_(0) 00119 , serial_number_(ROUTING_SLIP_ROOT_SERIAL_NUMBER + 1) 00120 , is_reloading_ (false) 00121 { 00122 } |
|
Destructor.
Definition at line 143 of file Standard_Event_Persistence.cpp. References ACE_DEBUG, ACE_TEXT(), LM_DEBUG, psb_, TAO_Notify::Routing_Slip_Persistence_Manager::release_all(), TAO_Notify::Persistent_File_Allocator::shutdown(), and TAO_debug_level.
00144 { 00145 if (TAO_debug_level > 0) 00146 { 00147 ACE_DEBUG ((LM_DEBUG, 00148 ACE_TEXT ("(%P|%t) Standard_Event_Persistence_Factory::~Standard_Event_Persistence_Factory\n") 00149 )); 00150 } 00151 this->root_.release_all (); 00152 delete this->psb_; 00153 this->psb_ = 0; 00154 this->allocator_.shutdown(); 00155 } |
|
Accessor for file allocator. Intended for use only by the Routing Slip Persistence Manager Definition at line 218 of file Standard_Event_Persistence.cpp.
00219 { 00220 return &this->allocator_; 00221 } |
|
Create a Persistence Manager.
Implements TAO_Notify::Event_Persistence_Factory. Definition at line 158 of file Standard_Event_Persistence.cpp. References ACE_NEW_RETURN, and TAO_Notify::Routing_Slip_Persistence_Manager::set_callback().
00160 { 00161 Routing_Slip_Persistence_Manager* rspm = 0; 00162 ACE_NEW_RETURN(rspm, Routing_Slip_Persistence_Manager(this), rspm); 00163 rspm->set_callback(callback); 00164 return rspm; 00165 } |
|
reloading process complete. Where should the chain continue?
Definition at line 179 of file Standard_Event_Persistence.cpp. References ACE_ASSERT, is_reloading_, and psb_. Referenced by TAO_Notify::Routing_Slip_Persistence_Manager::load_next().
00182 { 00183 ACE_ASSERT (this->psb_ == 0); 00184 this->psb_ = next_psb; 00185 this->serial_number_ = current_serial_number; 00186 this->is_reloading_ = false; 00187 } |
|
Begin the reload process by returning the first Routing_Slip_Persistence_Manager to continue call Routing_Slip_Persistence_Manager::load_next () Implements TAO_Notify::Event_Persistence_Factory. Definition at line 168 of file Standard_Event_Persistence.cpp. References is_reloading_, and TAO_Notify::Routing_Slip_Persistence_Manager::load_next().
00169 { 00170 Routing_Slip_Persistence_Manager * result = 0; 00171 if (this->is_reloading_) 00172 { 00173 result = this->root_.load_next(); 00174 } 00175 return result; 00176 } |
|
Definition at line 206 of file Standard_Event_Persistence.cpp. References TAO_Notify::Persistent_File_Allocator::allocate(), TAO_Notify::Persistent_Storage_Block::block_number(), and psb_. Referenced by preallocate_next_record(), and TAO_Notify::Routing_Slip_Persistence_Manager::store_root().
00209 { 00210 ++this->serial_number_; 00211 this->psb_ = this->allocator_.allocate(); 00212 00213 next_serial_number = this->serial_number_; 00214 next_block_number = ACE_Utils::truncate_cast<ACE_UINT32> (this->psb_->block_number()); 00215 } |
|
Open persistence file and initialize. /param filename the fully qualified path/name of the file to contain persistent information. /param block_size the size of a physical block on the device containing the file. Definition at line 125 of file Standard_Event_Persistence.cpp. References ACE_ASSERT, is_reloading_, TAO_Notify::Routing_Slip_Persistence_Manager::load(), TAO_Notify::Persistent_File_Allocator::open(), and TAO_Notify::Routing_Slip_Persistence_Manager::store_root(). Referenced by TAO_Notify::Standard_Event_Persistence::get_factory().
00127 { 00128 bool result = false; 00129 if (allocator_.open (filename, block_size)) 00130 { 00131 this->is_reloading_ = this->root_.load(ROUTING_SLIP_ROOT_BLOCK_NUMBER, ROUTING_SLIP_ROOT_SERIAL_NUMBER); 00132 if (! this->is_reloading_) 00133 { 00134 ACE_ASSERT (this->psb_ == 0); 00135 // this->psb_ = this->allocator_.allocate(); 00136 this->root_.store_root(); 00137 } 00138 result = true; 00139 } 00140 return result; 00141 } |
|
return current serial # and a psb containing current record# allocate new serial # and record number, and return those, too. Definition at line 190 of file Standard_Event_Persistence.cpp. References get_preallocated_pointer(), psb_, TAO_Notify::Persistent_Storage_Block::set_allocator_owns(), and TAO_Notify::Persistent_Storage_Block::set_sync(). Referenced by TAO_Notify::Routing_Slip_Persistence_Manager::store_i().
00195 { 00196 // return current serial number and 00197 // a psb containing current record number 00198 current_serial_number = this->serial_number_; 00199 this->psb_->set_allocator_owns(false); // give up ownership 00200 this->psb_->set_sync(); 00201 current_psb = this->psb_; 00202 this->get_preallocated_pointer (next_serial_number, next_block_number); 00203 } |
|
Access root record. Intended for use only by the Routing Slip Persistence Manager Definition at line 224 of file Standard_Event_Persistence.cpp.
00225 { 00226 return this->root_; 00227 } |
|
Definition at line 92 of file Standard_Event_Persistence.h. |
|
Definition at line 96 of file Standard_Event_Persistence.h. Referenced by done_reloading(), first_reload_manager(), and open(). |
|
Definition at line 89 of file Standard_Event_Persistence.h. Referenced by TAO_Notify::Routing_Slip_Persistence_Manager::remove(), and TAO_Notify::Routing_Slip_Persistence_Manager::store_i(). |
|
Definition at line 94 of file Standard_Event_Persistence.h. Referenced by done_reloading(), get_preallocated_pointer(), preallocate_next_record(), and ~Standard_Event_Persistence_Factory(). |
|
Definition at line 93 of file Standard_Event_Persistence.h. |
|
Definition at line 95 of file Standard_Event_Persistence.h. |