Gets an SDK adaptor by identifier.
The identifier of the adaptor to retrieve
The SDK adaptor instance
Adds a custom store to the root store.
The name of the custom store.
The class of the custom store.
Example:
import { makeAutoObservable, action } from "mobx";
import { CDF } from "./index";
class CustomStore {
rootStore: CDF;
customValue = "custom value";
constructor(rootStore: CDF) {
this.rootStore = rootStore;
makeAutoObservable(this);
}
@action setCustomValue(value: string) {
this.customValue = value;
}
}
store.addStore("customStore", CustomStore);
Releases every entity subscription held by this instance's stores.
Each store owns its synchronizer as a private field, so teardown has to be forwarded store by store — there is no way to reach them from outside.
Returns the identifier of the currently active SDK adaptor, or null if none is set.
The active adaptor identifier, or null
Returns the currently selected home group, or undefined if none is set.
Returns nodes that belong to the current home's nodeIds.
StaticdisposeTears down the singleton so the next initCDF builds a fresh one.
getInstance returns the cached instance and ignores the config it is
handed, so a host that needs to re-initialise against a DIFFERENT backend
(a deployment switch) must clear the singleton first or it silently keeps
running on the previous backend's stores.
Staticget
The root store that manages all individual stores.