|
DB support module documentationclusterSetAuditCounters :: () -> <ReadGraph> String The session's counters of the commit-time cluster set audit, which checks each write's
new resources against their nearest owner's cluster set, as clusterUIDOfResource :: Resource -> <ReadGraph> ClusterUID Returns the UID of the cluster that stores the given resource. collectClusters :: <Proc> () Releases as many cached clusters from memory as possible. The clusters are loaded again from the database when they are next needed. countQueries :: <ReadGraph> Integer Returns the number of queries currently held in the query cache. directStatements :: Resource -> Boolean -> <ReadGraph> [Statement] Returns the statements stored directly on the given resource, bypassing
inference and the query cache. When the second argument is domainSetImmutabilities :: [Resource] -> Boolean -> <WriteGraph> () Sets the immutability of the cluster sets owned by the given roots, as one operation:
domainSetImmutability :: Resource -> Boolean -> <WriteGraph> () Sets the immutability of the cluster set that the given resource owns, for example a whole model or ontology: of every cluster in it, and of the set, which then vouches that its clusters are immutable. Clusters of other cluster sets are left to their owners. A resource that owns no cluster set is left as it is, and logged. It walks no domain: the set says which clusters are the resource's. Requires a write transaction. dumpHeap :: String -> <Proc> () Writes a heap dump of the running JVM to the given file path, in the HPROF format that memory analysers read. Only live objects are dumped. Every failure is swallowed, so an unwritable path produces neither a dump nor a complaint. emptyTrashBinWithMonitor :: ProgressMonitor -> <Proc> () Permanently deletes everything in the trash bin of the current project, reporting progress to the given monitor. flushQueries :: QueryControl -> <Proc> Integer garbageResources :: <ReadGraph> [Resource] Returns the resources that are no longer reachable from the root library, that is, the ones the database still holds but nothing refers to. This walks every resource of every cluster in the database, collects all of their direct statements and then iterates a reachability fixpoint over them. It is a whole-database diagnostic and is correspondingly slow. getQueryControl :: () -> <Proc> QueryControl invalidateQueries :: QueryControl -> <WriteGraph> () isClusterLoaded :: ClusterUID -> <ReadGraph> Boolean Tells whether the given cluster is currently loaded in memory. Does not load it. isImmutableClusterSet :: Resource -> <ReadGraph> Boolean Whether the cluster set the given resource owns vouches that every one of its clusters is immutable: the whole set was made immutable, and no mutable cluster has joined it since. False is no guarantee either way. Loads no cluster. listClusters :: <ReadGraph> [ClusterUID] Returns the UIDs of all clusters that the database server knows about. mergeSources :: Resource -> TransferableGraphSource -> TransferableGraphSource -> <WriteGraph> () Modifies the resource given as the first argument so that its content matches the graph read from the second argument, using the third argument as the current state of the target. Requires a write transaction. modelTransferableGraphSource :: TransferableGraphConfiguration2 -> <ReadGraph> TransferableGraphSource Opens a transferable graph source over the content described by the given configuration. possibleClusterSetOf :: Resource -> <ReadGraph> Maybe Resource The resource owning the cluster set of the given resource's cluster. Immutability is a property of a cluster, and a cluster belongs to a cluster set, so this is what such an operation really acts on. printStack :: () -> <Proc> () Prints the current Java stack trace to the SCL console, or to the log if there is no console. For finding out where a piece of SCL code is being run from. resourcesByCluster :: ClusterUID -> <ReadGraph> [Resource] Returns the resources that exist in the given cluster. Every resource index the cluster can hold is probed, so the cost is proportional to the capacity of the cluster rather than to the number of resources in it, and the cluster is loaded if it was not loaded already. restrictQueries :: Integer -> Integer -> Integer -> <ReadGraph> () restrictQueries amount step maxTimeInMs Collects some DB queries. Tries to reach at maximum 'amount' queries. Uses at maximum 'maxTimeInMs' milliseconds in 'step' millisecond stints. serviceMode :: () -> <Proc> String The service mode of the caller's writes, as text: inside a write that write's, otherwise the one the calling thread's next write takes. Set and restored by hand, so a method that leaves it on changes every later write the same thread requests. setImmutable :: Resource -> Boolean -> <ReadGraph> () Sets the immutable flag of the cluster that the given resource belongs to. The
flag applies to the whole cluster, not to the single resource. Writing to an
immutable cluster fails unless it is done inside tgConfigurer :: Boolean -> Boolean -> <ReadGraph> TGConfigurer Creates a transferable graph configuration builder. The first argument leaves virtual resources out of the export, the second enables validation of the external references found while the export is produced. tgConfigurerCreate :: TGConfigurer -> TransferableGraphConfiguration2 Builds the transferable graph configuration from the roots and exclusions accumulated in the builder. tgConfigurerExclusions :: TGConfigurer -> [Resource] -> <Proc> TGConfigurer Marks the given resources as excluded, so that the export refers to them from the outside instead of including them. tgConfigurerRoots :: TGConfigurer -> [Resource] -> <ReadGraph> TGConfigurer Adds the given resources as export roots. Each root is exported together with everything it owns, and its own name literal is excluded. withServiceMode :: Boolean -> Boolean -> (() -> <b> a) -> <b> a
runs function
The mode applies to the writes |