Runtime
const mixin Runtime
Runtime manages a database, library namespace, and extensions. It is the base type for both Sys and Proj. In the Haxall daemon there is one runtime that is both the Sys and Proj. But in SkySpark there is one host level Sys for the VM and zero more separate Proj runtimes.
Return if this runtime is a project
Observables
Log for runtime level logging
Construct new context with user
Xeto lib namespace for this runtime
Convenience for commitAll to commit a single diff
Convenience for readByIds
Runtime file directory
Return the number of records which match the given filter string
Reference to system runtime
Match all the records against a filter string and return as grid
Display name of the runtime
Running flag
Runtime id which is always formatted as "p:{name}"
Extension lookup and management
Convenience for exts.get to lookup extension by lib dotted name
Read a list of records by ids into a grid
Match all the records against a filter string and return as list
Find the first record which matches the given filter string
Block until currently queued background processing completes
Has the runtime has reached steady state
Apply a list of diffs to the database in batch
Watch subscriptions
Runtime level meta data stored in the rt:meta database record
Read a list of records by id
Programatic name of the runtime
Xeto library management
Folio database for this runtime
Return if this runtime is the system
abstract Diff commit(Diff diff)
Convenience for commitAll to commit a single diff.
abstract Diff[] commitAll(Diff[] diffs)
Apply a list of diffs to the database in batch. Either all the changes are successfully applied, or else none of them are applied and an exception is raised. Return updated Diffs which encapsulate both the old and new version of each record.
If any of the records have been modified since they were read for the given change set then ConcurrentChangeErr is thrown unless Diff.force configured.
abstract Folio db()
Folio database for this runtime
abstract File dir()
Runtime file directory. It the root directory of all runtime oriented operational files. The folio database is stored under this directory in a sub-directory named db/, and namespace support in ns/
abstract Str dis()
Display name of the runtime.
abstract Ext? ext(Str name, Bool checked)
Convenience for exts.get to lookup extension by lib dotted name
abstract RuntimeExts exts()
Extension lookup and management
abstract Ref id()
Runtime id which is always formatted as "p:{name}"
abstract Bool isProj()
Return if this runtime is a project
abstract Bool isRunning()
Running flag. On startup this flag transitions to true before calling ready and start on all the extensions. On shutdown this flag transitions to false before calling unready and stop on all the libraries.
abstract Bool isSteadyState()
Has the runtime has reached steady state. Steady state is reached after a configurable wait period elapses after the runtime is fully loaded. This gives internal services time to spin up before interacting with external systems. See Runtime.
abstract Bool isSys()
Return if this runtime is the system
abstract RuntimeLibs libs()
Xeto library management
abstract Log log()
Log for runtime level logging
abstract RuntimeMeta meta()
Runtime level meta data stored in the rt:meta database record. This dict always includes a synthetic name tag
abstract Str name()
Programatic name of the runtime. This string is always a valid tag name.
virtual Context newContext(User user)
Construct new context with user
abstract Namespace ns()
Xeto lib namespace for this runtime
abstract RuntimeObservables obs()
Observables
abstract Dict? read(Str filter, Bool checked)
Find the first record which matches the given filter string. Throw UnknownRecErr or return null based on checked flag. See Filter Chapter for filter format.
abstract Grid readAll(Str filter, Dict? opts)
Match all the records against a filter string and return as grid. See Filter Chapter for filter format.
abstract Dict[] readAllList(Str filter, Dict? opts)
Match all the records against a filter string and return as list. See Filter Chapter for filter format. See readAll to return results as a grid.
abstract Dict? readById(Ref? id, Bool checked)
Convenience for readByIds
abstract Grid readByIds(Ref[] ids, Bool checked)
Read a list of records by ids into a grid. The rows in the result correspond by index to the ids list. If checked is true, then every id must be found in the project or UnknownRecErr is thrown. If checked is false, then an unknown record is returned as a row with every column set to null (including the id tag).
abstract Dict?[] readByIdsList(Ref[] ids, Bool checked)
Read a list of records by id. The resulting list matches the list of ids by index (null if record not found).
abstract Int readCount(Str filter)
Return the number of records which match the given filter string.
abstract This sync(Duration? timeout)
Block until currently queued background processing completes
abstract Sys sys()
Reference to system runtime
abstract RuntimeWatches watch()
Watch subscriptions