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
options?
Returns
MemoryTransferService
Properties
memory
readonlymemory:MemoryService
options
readonlyoptions: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
options?
Readonly<{ actorId?: string; dryRun?: boolean; strategy?: MemoryImportStrategy; }> = {}
Returns
Promise<MemoryImportReport>
parse()
parse(
serialized):MemoryExportDocument
Parameters
serialized
string
Returns
recoverInterruptedImport()
recoverInterruptedImport():
Promise<boolean>
Returns
Promise<boolean>
serialize()
serialize(
document):string
Parameters
document
Returns
string