Note: | If a license file cannot be found, the number of persistent monitors that the correlator allows is limited. See Running Apama without a license file. |
Note: | During development of a persistence application, it varies whether you want to specify a persistence option when you start the correlator. In the earlier stages of development, you might choose not to specify a persistence option since you might make many and frequent changes to early versions of your program, thereby making recovery of a previous version impossible. For example, you might have changed the structure and perhaps added new variables. Once your program structure becomes relatively stable, you must take into account what happens during recovery and you will want to define onBeginRecovery() and onConcludeRecovery() actions. These actions never get called in a correlator that was not started with a persistence option. To deploy a persistence application, the correlator must be started with a persistence option. |
Correlator Persistence Behavior | Default | Option for Changing |
The correlator waits a specified length of time between snapshots. | 200 milliseconds | -PsnapshotInterval=interval Or the corresponding option in a YAML configuration file: snapshotInterval: interval Specify an integer that indicates the number of milliseconds to wait. |
The correlator can automatically adjust the snapshot interval according to application behavior. It can be useful to set this to false to diagnose a problem or test a new feature. | true. The correlator automatically adjusts the snapshot interval. | -PadjustSnapshot=boolean Or the corresponding option in a YAML configuration file: adjustSnapshot: boolean |
The correlator puts the recovery datastore in a specified directory. | The directory in which the correlator was started. That is, the current directory. | -PstoreLocation=path Or the corresponding option in a YAML configuration file: storeLocation: path You can specify an absolute or relative path. The directory must exist. |
The correlator copies the snapshot into a specified file. This is the recovery datastore. | persistence.db | -PstoreName=filename Or the corresponding option in a YAML configuration file: storeName: filename Specify a filename without a path. |
For correlators that use an external clock, the correlator uses a specified time of day as its starting time when it restarts. This behavior is useful only for replaying input logs that contain recovery information. | The time of day captured in the last committed snapshot. | -XrecoveryTime num To change the default, specify an integer that indicates seconds since the epoch. |
The correlator can automatically copy the recovery datastore to the input log when a persistence-enabled correlator restarts. | The correlator copies the recovery datastore to the input log. | -noDatabaseInReplayLog You might set this option if you are using an input log as a record of what the correlator received. The recovery datastore is a large overhead that you probably do not need. Or, if you maintain an independent copy of the recovery datastore, you probably do not want a copy of it in the input log. |
Important: | If an option is specified both with one of the -P options on the command line and in a YAML configuration file, the value on the command line takes precedence and a warning is logged. |