Skip to content

apollo-code


apollo-code / storage/src / MemoryTransferService

Class: MemoryTransferService

Local-only, versioned Memory import/export with journaled rollback.

Constructors

Constructor

new MemoryTransferService(memory, options?): MemoryTransferService

Parameters

memory

MemoryService

options?

MemoryTransferOptions = {}

Returns

MemoryTransferService

Properties

memory

readonly memory: MemoryService


options

readonly options: MemoryTransferOptions = {}

Methods

export()

export(scopes): Promise<MemoryExportDocument>

Parameters

scopes

readonly MemoryRecordScope[]

Returns

Promise<MemoryExportDocument>


import()

import(serialized, targetScope, options?): Promise<MemoryImportReport>

Parameters

serialized

string

targetScope

MemoryRecordScope

options?

Readonly<{ actorId?: string; dryRun?: boolean; strategy?: MemoryImportStrategy; }> = {}

Returns

Promise<MemoryImportReport>


parse()

parse(serialized): MemoryExportDocument

Parameters

serialized

string

Returns

MemoryExportDocument


recoverInterruptedImport()

recoverInterruptedImport(): Promise<boolean>

Returns

Promise<boolean>


serialize()

serialize(document): string

Parameters

document

MemoryExportDocument

Returns

string