OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
org.opensplice.dds.domain.DomainParticipantFactory Interface Reference

OpenSplice-specific extension of org.omg.dds.domain.DomainParticipantFactory with support for detaching from all domains. More...

Collaboration diagram for org.opensplice.dds.domain.DomainParticipantFactory:
Collaboration graph

Public Member Functions

void detachAllDomains (boolean blockOperations, boolean deleteEntities)
 This operation safely detaches the application from all domains it is currently participating in. More...
 

Detailed Description

OpenSplice-specific extension of org.omg.dds.domain.DomainParticipantFactory with support for detaching from all domains.

Definition at line 28 of file DomainParticipantFactory.java.

Member Function Documentation

◆ detachAllDomains()

void org.opensplice.dds.domain.DomainParticipantFactory.detachAllDomains ( boolean  blockOperations,
boolean  deleteEntities 
)

This operation safely detaches the application from all domains it is currently participating in.

Note: This is a proprietary OpenSplice extension.

This operation safely detaches the application from all domains it is currently participating in. When this operation has been performed successfully, the application is no longer connected to any Domain. For Federated domains finishing this operation successfully means that all shared memory segments have been safely un-mapped from the application process. For SingleProcess mode domains this means all services for all domains have been stopped. This allows graceful termination of the OSPL services that run as threads within the application. Graceful termination of services in this mode would for instance allow durability flushing of persistent data and networking termination announcement over the network. When this call returns further access to all domains will be denied and it will not be possible for the application to open or re-open any DDS domain.

The behavior of the detach_all_domains operation is determined by the block_operations and delete_entities parameters:

block_operations:
This parameter specifies if the application wants any DDS operation to be blocked or not while detaching. When true, any DDS operation called during this operation will be blocked and remain blocked forever (so also after the detach operation has completed and returns to the caller). When false, any DDS operation called during this operation may return RETCODE_ALREADY_DELETED. Please note that a listener callback is not considered an operation in progress. Of course, if a DDS operation is called from within the listener callback, that operation will be blocked during the detaching if this attribute is set to TRUE.
delete_entities:
This parameter specifies if the application wants the DDS entities created by the application to be deleted (synchronously) while detaching from the domain or not. If true, all application entities are guaranteed to be deleted when the call returns. If false, application entities will not explicitly be deleted by this operation. In case of federated mode, the splice-daemon will delete them asynchronously after this operation has returned. In case of SingleProcess mode this attribute is ignored and clean up will always be performed, as this cannot be delegated to a different process.

Note: In federated mode when the detach_all_domain operation is called with block_operations is false and delete_entities is false then the DDS operations which are in progress and which are waiting for some condition to become true or waiting for an event to occur while the detach operation is performed may be blocked.

Parameters
blockOperationsIndicates whether the application wants any operations that are called while detaching to be blocked or not.
deleteEntitiesIndicates whether the application DDS entities in the 'connected' domains must be deleted synchronously during detaching.

The documentation for this interface was generated from the following file: