RTI Connext Java API Version 7.2.0
|
Configures durable writer history and durable reader state. More...
Inherits Struct.
Public Member Functions | |
PersistentStorageSettings () | |
Constructor. More... | |
PersistentStorageSettings (PersistentStorageSettings src) | |
Copy constructor. More... | |
Public Attributes | |
boolean | enable = false |
Enables durable writer history in a com.rti.dds.publication.DataWriter and durable reader state in a com.rti.dds.subscription.DataReader. More... | |
String | file_name = null |
The file name where the durable writer history or durable reader state will be stored. More... | |
String | trace_file_name = null |
The file name where to store the SQL statements executed when loading and storing the durable writer history or durable reader state. More... | |
PersistentJournalKind | journal_kind |
Sets the journal mode of the persistent storage. More... | |
PersistentSynchronizationKind | synchronization_kind |
Sets the journal mode of the persistent storage. More... | |
boolean | vacuum = true |
Sets the auto-vacuum status of the storage. More... | |
boolean | restore = true |
Indicates if the persisted writer history or reader state must be restored. More... | |
AllocationSettings_t | writer_instance_cache_allocation |
Configures the resource limits associated with the instance durable writer history cache. More... | |
AllocationSettings_t | writer_sample_cache_allocation |
Configures the resource limits associated with the sample durable writer history cache. More... | |
boolean | writer_memory_state = true |
Determines how much state will be kept in memory by the durable writer history in order to avoid accessing the persistent storage in disk. More... | |
int | reader_checkpoint_frequency = 1 |
Controls how often the reader state is stored into the database. More... | |
Configures durable writer history and durable reader state.
In a com.rti.dds.publication.DataWriter, this structure configures durable writer history. This feature allows a DataWriter to persist its historical cache, so that it can survive shutdowns, crashes, and restarts. When an application restarts, each DataWriter that has been configured to have durable writer history automatically loads all of the data in this cache from disk and can carry on sending data as if it had never stopped executing.
In a com.rti.dds.subscription.DataReader, this structure configures durable reader state. This feature allows a DataReader to persist its state and remember which data it has already received. When an application restarts, each DataReader that has been configured to have durable reader state automatically loads its state from disk and can carry on receiving data as if it had never stopped executing. Data that had already been received by the DataReader before the restart will be suppressed so that it is not even sent over the network.
RTI Connext uses SQLite to store the durable writer history and durable reader state.
Constructor.
Copy constructor.
src | <<in>> Source object. |
boolean enable = false |
Enables durable writer history in a com.rti.dds.publication.DataWriter and durable reader state in a com.rti.dds.subscription.DataReader.
When this field is set to com.rti.dds.infrastructure.true, the persistent storage configuration using this structure will take precedence over the configuration using the deprecated dds.data_writer.history.odbc_plugin.builtin.* and dds.data_reader.state.* properties.
[default] com.rti.dds.infrastructure.false
String file_name = null |
The file name where the durable writer history or durable reader state will be stored.
Setting this field to a value other than null is mandatory when enabling durable writer history or durable reader state.
If the file does not exist, it will be created.
If the file exists and com.rti.dds.infrastructure.PersistentStorageSettings.restore is set to com.rti.dds.infrastructure.true, the durable writer history or durable reader state will be restored from the file. Otherwise, the file will be overwritten.
Important: When the file exists, the fields com.rti.dds.infrastructure.DataReaderProtocolQosPolicy.virtual_guid and com.rti.dds.infrastructure.DataWriterProtocolQosPolicy.virtual_guid will be set by RTI Connext based on the file content. If you change these fields, the value will be ignored.
RTI Connext uses SQLite to store the durable writer history and durable reader state.
[default] null
String trace_file_name = null |
The file name where to store the SQL statements executed when loading and storing the durable writer history or durable reader state.
Setting this field to a value other than null will enable tracing of the SQL statements executed when loading and storing the durable writer history or durable reader state.
Important: Enabling tracing will have a negative impact on performance. Use this feature only for debugging purposes.
[default] null
PersistentJournalKind journal_kind |
Sets the journal mode of the persistent storage.
[default] com.rti.dds.infrastructure.PersistentJournalKind.PersistentJournalKind.WAL_PERSISTENT_JOURNAL
PersistentSynchronizationKind synchronization_kind |
Sets the journal mode of the persistent storage.
[default] com.rti.dds.infrastructure.PersistentJournalKind.PersistentJournalKind.WAL_PERSISTENT_JOURNAL
boolean vacuum = true |
Sets the auto-vacuum status of the storage.
When auto-vacuum is com.rti.dds.infrastructure.true, the storage files will be compacted automatically with every transaction.
When auto-vacuum is com.rti.dds.infrastructure.false, after data is deleted from the storage files, the files remain the same size.
[default] com.rti.dds.infrastructure.true
boolean restore = true |
Indicates if the persisted writer history or reader state must be restored.
For a com.rti.dds.publication.DataWriter, this field indicates whether or not the persisted writer history must be restored once the DataWriter is restarted.
For a com.rti.dds.subscription.DataReader, this field indicates whether or not the persisted reader state must be restored once the DataReader is restarted.
[default] com.rti.dds.infrastructure.true
AllocationSettings_t writer_instance_cache_allocation |
Configures the resource limits associated with the instance durable writer history cache.
This field only applies to com.rti.dds.publication.DataWriter entities.
To minimize the number of accesses to the persisted storage, RTI Connext uses an instance cache.
Do not confuse this limit with the initial and maximum number of instances that can be maintained by a DataWriter in persistent storage. These resource limits are configured using com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_instances and com.rti.dds.infrastructure.ResourceLimitsQosPolicy.initial_instances.
If com.rti.dds.infrastructure.PersistentStorageSettings.writer_memory_state is set to com.rti.dds.infrastructure.true, then the value of com.rti.dds.infrastructure.AllocationSettings_t.max_count is set to com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED, overwriting any value set by the user.
com.rti.dds.infrastructure.AllocationSettings_t.incremental_count is ignored.
[range] com.rti.dds.infrastructure.AllocationSettings_t.max_count in interval [1, INT_MAX], com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO, or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED. com.rti.dds.infrastructure.AllocationSettings_t.initial_count in interval [1, INT_MAX], or com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO.
com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO means that the value will be set to the equivalent value of com.rti.dds.infrastructure.ResourceLimitsQosPolicy.
[default] com.rti.dds.infrastructure.AllocationSettings_t.max_count = com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO (= com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_instances) and com.rti.dds.infrastructure.AllocationSettings_t.initial_count = com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO (= com.rti.dds.infrastructure.ResourceLimitsQosPolicy.initial_instances).
AllocationSettings_t writer_sample_cache_allocation |
Configures the resource limits associated with the sample durable writer history cache.
This field only applies to com.rti.dds.publication.DataWriter entities.
To minimize the number of accesses to the persisted storage, RTI Connext uses a sample cache.
Do not confuse this limit with the initial and maximum number of samples that can be maintained by a DataWriter in persistent storage. These resource limits are configured using com.rti.dds.infrastructure.ResourceLimitsQosPolicy.max_samples and com.rti.dds.infrastructure.ResourceLimitsQosPolicy.initial_samples.
com.rti.dds.infrastructure.AllocationSettings_t.incremental_count is ignored.
[range] com.rti.dds.infrastructure.AllocationSettings_t.max_count in interval [1, INT_MAX], com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO, or com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED. com.rti.dds.infrastructure.AllocationSettings_t.initial_count in interval [1, INT_MAX], or com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO.
com.rti.dds.infrastructure.ReceiverPoolQosPolicy.LENGTH_AUTO means that the value will be set to the equivalent value of com.rti.dds.infrastructure.ResourceLimitsQosPolicy.
[default] com.rti.dds.infrastructure.AllocationSettings_t.max_count = 32 and com.rti.dds.infrastructure.AllocationSettings_t.initial_count = 32.
boolean writer_memory_state = true |
Determines how much state will be kept in memory by the durable writer history in order to avoid accessing the persistent storage in disk.
This field only applies to com.rti.dds.publication.DataWriter entities.
If this field is set to com.rti.dds.infrastructure.true, then com.rti.dds.infrastructure.AllocationSettings_t.max_count in com.rti.dds.infrastructure.PersistentStorageSettings.writer_instance_cache_allocation is set to com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED, overwriting any value set by the user.
In addition, the durable writer history will keep a fixed state overhead per sample in memory. This mode provides the best durable writer history performance. However, the restore operation will be slower, and the maximum number of samples that the durable writer history can manage is limited by the available physical memory.
If this field is set to com.rti.dds.infrastructure.false, all the state will be kept in the underlying database. In this mode, the maximum number of samples in the durable writer history is not limited by the physical memory available.
This field is always set to com.rti.dds.infrastructure.false when the DataWriter is configured with com.rti.dds.infrastructure.ReliabilityQosPolicy.acknowledgment_kind set to com.rti.dds.infrastructure.ReliabilityQosPolicyAcknowledgmentModeKind.APPLICATION_AUTO_ACKNOWLEDGMENT_MODE or com.rti.dds.infrastructure.ReliabilityQosPolicyAcknowledgmentModeKind.APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE, or com.rti.dds.infrastructure.AvailabilityQosPolicy.enable_required_subscriptions is set to com.rti.dds.infrastructure.true.
[default] com.rti.dds.infrastructure.true
int reader_checkpoint_frequency = 1 |
Controls how often the reader state is stored into the database.
This field only applies to com.rti.dds.subscription.DataReader entities.
A value of N means store the state once every N received and processed samples.
The circumstances under which a data sample is considered "processed by the application" depends on the DataReader configuration.
For additional information on when a sample is considered "processed by the application" see Durable Reader State, in the Core Libraries User's Manual.
A high value will provide better performance. However, if the DataReader is restarted it may receive some duplicate samples.
[range] [1, 1000000] [default] 1