| anticipate_assignment() | backup() | config() | set_heartbeat() | shutdown() |
anticipate_assignment()
INTEGER anticipate_assignment()
Do not use this unless you know exactly what you are doing, and how stacks and frames work in the ColdC driver. This function is used to reduce the amount of references to data on the stack, in order to keep from unnecessarily copying data. Essentially it is meant to optimize utility methods that will modify data and return the result, and the result is assigned to a variable. To keep from unnecessarily copying the data, the variable is cleared of any references before the data is modified.
backup()
INTEGER backup()
This function synchronizes the running database to disk and starts an asynchronous backup (Genesis copies the files to the file binary.bak, unless an alternative binary database directory name was specified upon bootup). This function executes atomically, and a slight pause may be noticed while it synchronizes the object cache to disk and copies the index files.
The return value of this function is always 1, and should be ignored. If a backup is in progress the error ~perm is thrown. The error ~file is thrown if there are file or directory problems. When the asynchronous backup is finished the driver calls $sys.backup_done().
config()
ANY config(SYMBOL what[, ANY value])
This administrative function is used to change run-time values for the driver and execution states. Currently, Genesis only partially implements this function—it recognizes the changes but does not fully comply with them (in short, it can be used to fetch configuration values, but should not be relied on to set them). The configuration value is specified with the argument what. If no second argument is given, the current value is returned. In theory, if a second argument is given, the value is set to that value, if appropriate. If the new value is inappropriate the error ~type is thrown. Values are:
| 'datasize | Maximum Data Size (in bytes) |
| 'forkdepth | Maximum fork depth |
| 'calldepth | Maximum call depth |
| 'recursion | Maximum Swapping |
| 'objswap | Object Swapping |
set_heartbeat()
INTEGER set_heartbeat(INTEGER interval)
This function sets the periodic global heartbeat for the database to the argument interval, where interval is in the delay in seconds. The heartbeat can be disabled by setting the interval to 0 (zero) or a negative number. The default heartbeat interval is defined as NO_HEARTBEAT_INTERVAL in defs.h. The heartbeat is sent by the driver calling the method $sys.heartbeat().
shutdown()
INTEGER shutdown()
This function completes all of the current tasks, synchronizes the database, flushes all output and shuts down the server.