31 const size_t len = from.first;
35 to = std::make_pair(len, static_cast<char*>(out_buf));
45 to.
set(static_cast<char*>(out_buf), len - 1,
false);
64 : domainId(topic.domainId),
65 topicId(topic.topicId),
66 participantId(topic.participantId)
79 char* strMemory =
const_cast<char*
>(name.
fast_rep());
81 allocator->
free(strMemory);
85 char* strMemory =
const_cast<char*
>(dataType.
fast_rep());
87 allocator->
free(strMemory);
90 allocator->
free(topicQos.second.second);
108 participantQos(pQos) {}
112 : domainId(participant.domainId),
113 owner(participant.owner),
114 participantId(participant.participantId)
122 allocator->
free(participantQos.second.second);
145 : domainId(actor.domainId),
146 actorId(actor.actorId),
147 topicId(actor.topicId),
148 participantId(actor.participantId), type(actor.type)
149 , transportContext(actor.transportContext)
156 drdwQos.first = actor.
drdwQos.first;
173 if (callback.
length() > 0)
175 char* strMemory =
const_cast<char*
>(callback.
fast_rep());
177 allocator->
free(strMemory);
180 allocator->
free(pubsubQos.second.second);
181 allocator->
free(drdwQos.second.second);
182 allocator->
free(transportInterfaceInfo.second);
233 ,
size_t size,
bool& exists)
239 if (allocator.
find(tag.c_str(), index) == 0) {
246 if (allocator.
bind(tag.c_str(), index) == -1) {
247 allocator.
free(index);
254 ACE_TEXT(
"(%P|%t) ERROR: PersistenceUpdater::init: ")
255 ACE_TEXT(
"Initial allocation/Bind failed for %C.\n"),
262 template<
typename I>
void 266 for (
typename I::ITERATOR iter = index->begin()
267 ; iter != index->end();) {
268 typename I::ITERATOR current_iter = iter;
271 if (index->unbind((*current_iter).ext_id_, allocator) != 0) {
273 ACE_TEXT(
"(%P|%t) ERROR: PersistenceUpdater::init: ")
274 ACE_TEXT(
"Index unbind failed.\n")));
287 ACE_TEXT(
"No UpdateManager discovered.\n")));
291 this->
parse(argc, argv);
293 #if defined ACE_HAS_MAC_OSX && defined __x86_64__ && __x86_64__ 319 if (!participant_index) {
363 for (
ssize_t count = 0; count < argc; count++) {
365 if ((count + 1) < argc) {
371 if ((count + 1) < argc) {
427 "(%P|%t) PersistenceUpdater::requestImage(): loaded participant %C\n",
441 image.
topics.push_back(dTopic);
467 , pubsub_qos, drdw_qos, in_transport_seq, actor->
transportContext, in_csp_bin
469 image.
actors.push_back(dActor);
578 csp_bin.exprParams = std::make_pair(dst4.
length(), dst4.
base());
694 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update: ")
695 ACE_TEXT(
"participant %C not found\n"),
696 std::string(converter).c_str()));
706 if (this->
topic_index_->
find(ext, topic_data, this->allocator_.get()) == 0) {
717 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update: ")
719 std::string(converter).c_str()));
729 if (this->
actor_index_->
find(ext, actor_data, this->allocator_.get()) == 0) {
740 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update(writerQos): ")
741 ACE_TEXT(
"publication %C not found\n"),
742 std::string(converter).c_str()));
752 if (this->
actor_index_->
find(ext, actor_data, this->allocator_.get()) == 0) {
763 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update(publisherQos): ")
764 ACE_TEXT(
"publication %C not found\n"),
765 std::string(converter).c_str()));
775 if (this->
actor_index_->
find(ext, actor_data, this->allocator_.get()) == 0) {
786 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update(readerQos): ")
787 ACE_TEXT(
"subscription %C not found\n"),
788 std::string(converter).c_str()));
798 if (this->
actor_index_->
find(ext, actor_data, this->allocator_.get()) == 0) {
809 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update(subscriberQos): ")
810 ACE_TEXT(
"subscription %C not found\n"),
811 std::string(converter).c_str()));
823 outCdr << exprParams;
832 ACE_TEXT(
"(%P|%t) PersistenceUpdater::update(readerQos): ")
833 ACE_TEXT(
"subscription %C not found\n"),
834 std::string(converter).c_str()));
874 ACE_TEXT(
"(%P|%t) PersistenceUpdater::destroy: ")
876 std::string(converter).c_str()));
884 size_t len = data.
length();
891 storage.second =
static_cast<char*
>(buffer);
905 (ace_svc_desc_PersistenceUpdaterSvc);
ParticipantStrt(const DParticipant &participant, PersistenceUpdater::ALLOCATOR *allocator)
const char * c_str(void) const
#define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)
ACE_CDR::ULong transportContext
size_t length(void) const
ACE_FACTORY_DEFINE(OpenDDS_InfoRepoDiscovery, IRDiscoveryLoader)
virtual int fini()
ACE_Task_Base finish method.
Conversion processing and value testing utilities for DCPS Information Repository identifiers...
ActorStrt(const DActor &actor, PersistenceUpdater::ALLOCATOR *allocator)
int unbind(const EXT_ID &, INT_ID &, ACE_Allocator *alloc)
const GUID_t GUID_UNKNOWN
Nil value for GUID.
& ACE_SVC_NAME(TAO_AV_TCP_Factory)
TopicIndex * topic_index_
Persisted Topics.
static int process_directive(const ACE_TCHAR directive[])
void index_cleanup(I *index, PersistenceUpdater::ALLOCATOR *allocator)
ACE_CDR::ULong transportContext
void * memcpy(void *t, const void *s, size_t len)
PartIdType * last_part_id_
What the last participant id is/was.
CSP contentSubscriptionProfile
unsigned long hash() const
ACE_Hash_Map_With_Allocator< IdType_ExtId, Topic * > TopicIndex
ParticipantStrt(const DDS::DomainId_t &dId, long own, const IdType &pId, const QosSeq &pQos)
int bind(const EXT_ID &, const INT_ID &, ACE_Allocator *alloc)
static TYPE * instance(const ACE_TCHAR *name)
int find(const EXT_ID &, INT_ID &, ACE_Allocator *alloc)
void * createIndex(const std::string &tag, PersistenceUpdater::ALLOCATOR &allocator, size_t size, bool &exists)
void cleanup(PersistenceUpdater::ALLOCATOR *allocator)
std::pair< size_t, char * > BinSeq
virtual void requestImage()
void cleanup(PersistenceUpdater::ALLOCATOR *allocator)
ACE_STATIC_SVC_DEFINE(ACE_Logging_Strategy, ACE_TEXT("Logging_Strategy"), ACE_Service_Type::SERVICE_OBJECT, &ACE_SVC_NAME(ACE_Logging_Strategy), ACE_Service_Type::DELETE_THIS|ACE_Service_Type::DELETE_OBJ, 0) extern "C" int _get_dll_unload_policy()
ACE_Allocator_Adapter< ACE_Malloc< ACE_MMAP_MEMORY_POOL, TAO_SYNCH_MUTEX > > ALLOCATOR
virtual void * malloc(size_t nbytes)
virtual void create(const UTopic &topic)
Add topic to be persisted.
TopicStrt(const DTopic &topic, PersistenceUpdater::ALLOCATOR *allocator)
size_t strlen(const char *s)
virtual int find(const char *name, void *&pointer)
void cleanup(PersistenceUpdater::ALLOCATOR *allocator)
virtual int svc()
ACE_Task_Base start method.
long checksum() const
Calculate the CRC32 checksum.
ACE_TString persistence_file_
ACE_Hash_Map_With_Allocator< IdType_ExtId, Participant * > ParticipantIndex
bool operator==(const IdType_ExtId &ext) const
DOMAINID_TYPE_NATIVE DomainId_t
virtual ~PersistenceUpdater()
void add(TAO_DDS_DCPSInfo_i *info)
std::pair< SpecificQos, BinSeq > QosSeq
static int consolidate(ACE_Message_Block *dst, const ACE_Message_Block *src)
#define ACE_ALLOCATOR_RETURN(POINTER, ALLOCATOR, RET_VAL)
void assign(ACE_CString &to, const char *from, Update::PersistenceUpdater::ALLOCATOR *allocator)
void set(const char *s, bool release=true)
ParticipantIndex * participant_index_
Persisted Participants.
virtual void updateLastPartId(PartIdType partId)
Update Last Participant Id for repo.
PartIdType lastPartId
What the last participant id is/was.
ParticipantSeq participants
virtual void update(const IdPath &id, const DDS::DomainParticipantQos &qos)
Persist updated Qos parameters for a Participant.
ACE_Hash_Map_With_Allocator< IdType_ExtId, RWActor * > ActorIndex
#define ACE_ALLOCATOR(POINTER, ALLOCATOR)
virtual int bind(const char *name, void *pointer, int duplicates=0)
ActorIndex * actor_index_
Persisted Readers and Writers.
BinSeq serializedTypeInfo
OpenDDS::DCPS::unique_ptr< ALLOCATOR > allocator_
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
int strcasecmp(const char *s, const char *t)
ACE_CString filterClassName
const char * fast_rep(void) const
const ACE_Message_Block * begin(void) const
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
void storeUpdate(const ACE_Message_Block &data, BinSeq &storage)
virtual void free(void *ptr)
#define ACE_NEW_RETURN(POINTER, CONSTRUCTOR, RET_VAL)
virtual void destroy(const IdPath &id, ItemType type, ActorType actor)
Remove an entity (but not children) from persistence.
#define ACE_DEFAULT_BASE_ADDR
BinSeq transportInterfaceInfo
void pushImage(const DImage &image)
Downstream request to push image.
size_type length(void) const
virtual int init(int argc, ACE_TCHAR *argv[])
Service object initialization.
ContentSubscriptionBin contentSubscriptionProfile
The Internal API and Implementation of OpenDDS.
int parse(int argc, ACE_TCHAR *argv[])
void operator=(const IdType_ExtId &ext)
sequence< string > StringSeq