Skip to content

HeliosStorageManager

class

Back to Helios Web API

Kind
class
Source
src/storage/HeliosStorageManager.js:743

Description

Base storage facade for Helios state snapshots, sessions, and portable network state.

Signature

export class HeliosStorageManager extends EventTarget {

Lifecycle

Creation, initialization, prewarming, cleanup, and renderer lifetime.

destroy()

Source: src/storage/HeliosStorageManager.js:2975

Manages destroy for the current instance.

Filtering And State

Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.

pendingStateChangeCount()

Source: src/storage/HeliosStorageManager.js:1550

Configures or reads pending state change count.

hasPendingStateChanges()

Source: src/storage/HeliosStorageManager.js:1554

Returns the current pending state changes value or state.

Example


const value = helios.hasPendingStateChanges();

recordPortableState(path, value, options = {})

Source: src/storage/HeliosStorageManager.js:1883

Configures or reads record portable state.

Parameters

NameTypeAttributesDefaultDescription
pathFilesystem path to read from or write to.
valueNew record portable state value. Omit this argument to read the current value.
optionsObjectoptional{}Options object for this operation.

restorePortableStateFromNetwork(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2899

Read or set the restore portable state from network setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current restore portable state from network value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.restorePortableStateFromNetwork({
  enabled: true,
});

Network And Persistence

Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.

loadPreferences()

Source: src/storage/HeliosStorageManager.js:1011

Handles preferences for the current graph or visualization state.

markNetworkDirty(reason = 'network-change')

Source: src/storage/HeliosStorageManager.js:1043

Configures or reads mark network dirty.

Parameters

NameTypeAttributesDefaultDescription
reasonstringoptional'network-change'Reason for this operation.

serializeSnapshot(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:1932

Read or set the serialize snapshot setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current serialize snapshot value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.serializeSnapshot({
  enabled: true,
});

serializeSessionSnapshot(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2136

Read or set the serialize session snapshot setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current serialize session snapshot value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.serializeSessionSnapshot({
  enabled: true,
});

saveSessionSnapshot(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2317

Read or set the save session snapshot setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current save session snapshot value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.saveSessionSnapshot({
  enabled: true,
});

restoreSessionSnapshot(snapshot = {}, options = {}) → {this}

Source: src/storage/HeliosStorageManager.js:2360

Updates the session snapshot state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptional{}Value passed to restoreSessionSnapshot.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

serializeNetworkSnapshot(options = {}) → {Promise<Object>}

Source: src/storage/HeliosStorageManager.js:2456

Serialize a visualization envelope suitable for attachment to a portable network export. The envelope includes the current storageState snapshot.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalSnapshot options forwarded to Helios.

Returns

Visualization-state envelope.

Type Promise<Object>

Example


helios.serializeNetworkSnapshot({
  enabled: true,
});

attachVisualizationStateToNetwork(snapshot = null, options = {}) → {Promise<unknown>}

Source: src/storage/HeliosStorageManager.js:2492

Attach a visualization-state envelope to the active network.

Parameters

NameTypeAttributesDefaultDescription
snapshotObject|nulloptionalnullExisting visualization envelope, or null to capture one through storage.
optionsObjectoptionalAttachment options.

Returns

The underlying Helios attachment result.

Type Promise<unknown>

saveNetworkSnapshot(format = 'zxnet', options = {}) → {Promise<unknown>}

Source: src/storage/HeliosStorageManager.js:2507

Save the active network with visualization state attached.

Parameters

NameTypeAttributesDefaultDescription
formatstringoptional'zxnet'Portable network format.
optionsObjectoptionalSave options forwarded to Helios.

Returns

Serialized network payload.

Type Promise<unknown>

restoreNetworkSnapshot(source, options = {}) → {Promise<unknown>}

Source: src/storage/HeliosStorageManager.js:2525

Restore a portable network snapshot through Helios network loading.

Parameters

NameTypeAttributesDefaultDescription
sourceunknownNetwork payload or file-like source.
optionsObjectoptionalRestore options forwarded to Helios.

Returns

Loaded network result.

Type Promise<unknown>

restoreSnapshot(snapshot = {}, options = {}) → {this}

Source: src/storage/HeliosStorageManager.js:2533

Updates the snapshot state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptional{}Value passed to restoreSnapshot.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

loadSession(sessionId = this.sessionId, options = {})

Source: src/storage/HeliosStorageManager.js:2551

Handles session for the current graph or visualization state.

Parameters

NameTypeAttributesDefaultDescription
sessionIdoptionalthis.sessionIdValue passed to loadSession.
optionsObjectoptional{}Options object for this operation.

restoreActiveSession(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2627

Read or set the restore active session setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current restore active session value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.restoreActiveSession({
  enabled: true,
});

saveSession(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2771

Read or set the save session setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current save session value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.saveSession({
  enabled: true,
});

restoreSession(sessionIdOrRecord, options = {}) → {this}

Source: src/storage/HeliosStorageManager.js:2867

Updates the session state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
sessionIdOrRecordValue passed to restoreSession.
optionsObjectoptional{}Options object for this operation.

Returns

This instance.

Type this

Layout And Positions

Layout selection, position sources, interpolation, and position snapshots. LayoutBehavior handles the built-in layout UI.

markPositionsDirty(reason = 'positions-change')

Source: src/storage/HeliosStorageManager.js:1067

Configures or reads mark positions dirty.

Parameters

NameTypeAttributesDefaultDescription
reasonstringoptional'positions-change'Reason for this operation.

Configuration

General configuration setters and compatibility helpers.

getUnfinishedSessionId()

Source: src/storage/HeliosStorageManager.js:825

Returns the current unfinished session id value or state.

Example


const value = helios.getUnfinishedSessionId();

setUnfinishedSessionId(id) → {this}

Source: src/storage/HeliosStorageManager.js:829

Set the unfinished session id setting.

Parameters

NameTypeAttributesDefaultDescription
idValue passed to setUnfinishedSessionId.

Returns

This instance.

Type this

setOverrideTrackingReady(ready = true) → {this}

Source: src/storage/HeliosStorageManager.js:833

Set the override tracking ready setting.

Parameters

NameTypeAttributesDefaultDescription
readyoptionaltrueValue passed to setOverrideTrackingReady.

Returns

This instance.

Type this

getPreferences()

Source: src/storage/HeliosStorageManager.js:999

Returns the current preferences value or state.

Example


const value = helios.getPreferences();

setSessionNickname(nickname, id = this.sessionId) → {this}

Source: src/storage/HeliosStorageManager.js:1097

Set the session nickname setting.

Parameters

NameTypeAttributesDefaultDescription
nicknameValue passed to setSessionNickname.
idoptionalthis.sessionIdValue passed to setSessionNickname.

Returns

This instance.

Type this

getSession(id)

Source: src/storage/HeliosStorageManager.js:2780

Returns the current session value or state.

Parameters

NameTypeAttributesDefaultDescription
idValue passed to getSession.

getResumeSessions(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2817

Read or set the get resume sessions setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current get resume sessions value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.getResumeSessions({
  enabled: true,
});

getResumePrompt(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2846

Read or set the get resume prompt setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current get resume prompt value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.getResumePrompt({
  enabled: true,
});

Utilities

Additional public helpers that do not belong to a narrower API area.

configure(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:944

Read or set the configure setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current configure value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.configure({
  enabled: true,
});

updatePreferences(patch = {})

Source: src/storage/HeliosStorageManager.js:1015

Configures or reads update preferences.

Parameters

NameTypeAttributesDefaultDescription
patchoptional{}Value passed to updatePreferences.

acknowledgeSavedSnapshot(reason = 'save-acknowledged', options = {})

Source: src/storage/HeliosStorageManager.js:1558

Configures or reads acknowledge saved snapshot.

Parameters

NameTypeAttributesDefaultDescription
reasonstringoptional'save-acknowledged'Reason for this operation.
optionsObjectoptional{}Options object for this operation.

debugStats(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:1825

Read or set the debug stats setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current debug stats value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.debugStats({
  enabled: true,
});

status()

Source: src/storage/HeliosStorageManager.js:1892

Configures or reads status.

persistenceStatus()

Source: src/storage/HeliosStorageManager.js:1896

Configures or reads persistence status.

deserializeSessionSnapshot(snapshot = {})

Source: src/storage/HeliosStorageManager.js:2272

Configures or reads deserialize session snapshot.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptional{}Value passed to deserializeSessionSnapshot.

captureSessionThumbnail(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2276

Read or set the capture session thumbnail setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current capture session thumbnail value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.captureSessionThumbnail({
  enabled: true,
});

configureSession(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2583

Read or set the configure session setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current configure session value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.configureSession({
  enabled: true,
});

startNewSession(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2668

Read or set the start new session setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current start new session value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.startNewSession({
  enabled: true,
});

flushPreviousSessionForSwitch(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2704

Read or set the flush previous session for switch setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current flush previous session for switch value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.flushPreviousSessionForSwitch({
  enabled: true,
});

listSessions(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2787

Read or set the list sessions setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current list sessions value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.listSessions({
  enabled: true,
});

listSessionSummaries(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2810

Read or set the list session summaries setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current list session summaries value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.listSessionSummaries({
  enabled: true,
});

resumeSession(sessionId, options = {})

Source: src/storage/HeliosStorageManager.js:2862

Configures or reads resume session.

Parameters

NameTypeAttributesDefaultDescription
sessionIdValue passed to resumeSession.
optionsObjectoptional{}Options object for this operation.

deleteSession(id)

Source: src/storage/HeliosStorageManager.js:2874

Configures or reads delete session.

Parameters

NameTypeAttributesDefaultDescription
idValue passed to deleteSession.

markSessionFinished(id = this.sessionId)

Source: src/storage/HeliosStorageManager.js:2885

Configures or reads mark session finished.

Parameters

NameTypeAttributesDefaultDescription
idoptionalthis.sessionIdValue passed to markSessionFinished.

flush(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2910

Read or set the flush setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current flush value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.flush({
  enabled: true,
});

sync(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2948

Read or set the sync setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current sync value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.sync({
  enabled: true,
});

flushAutosync(options = {}) → {Object|this}

Source: src/storage/HeliosStorageManager.js:2952

Read or set the flush autosync setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current flush autosync value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.flushAutosync({
  enabled: true,
});