Skip to main content
Version: v1

FileDeltaStorageService Class

Provides access to the underlying delta storage on the local file storage for file driver.

Signature

export declare class FileDeltaStorageService implements IDocumentDeltaStorageService

Implements: IDocumentDeltaStorageService

Constructors

Constructor Description
(constructor)(path) Constructs a new instance of the FileDeltaStorageService class

Properties

Property Type Description
ops readonly Readonly<api.ISequencedDocumentMessage>[]

Methods

Method Return Type Description
fetchMessages(from, to, abortSignal, cachedOnly) IStream<api.ISequencedDocumentMessage[]>
getFromWebSocket(from, to) api.ISequencedDocumentMessage[] Retrieve ops within the exclusive sequence number range.

Constructor Details

(constructor)

Constructs a new instance of the FileDeltaStorageService class

Signature

constructor(path: string);

Parameters

Parameter Type Description
path string

Property Details

ops

Signature

get ops(): readonly Readonly<api.ISequencedDocumentMessage>[];

Type: readonly Readonly<api.ISequencedDocumentMessage>[]

Method Details

fetchMessages

Signature

fetchMessages(from: number, to: number | undefined, abortSignal?: AbortSignal, cachedOnly?: boolean): IStream<api.ISequencedDocumentMessage[]>;

Parameters

Parameter Modifiers Type Description
from number
to number | undefined
abortSignal optional AbortSignal
cachedOnly optional boolean

Returns

Return type: IStream<api.ISequencedDocumentMessage[]>

getFromWebSocket

Retrieve ops within the exclusive sequence number range.

Signature

getFromWebSocket(from: number, to: number): api.ISequencedDocumentMessage[];

Parameters

Parameter Type Description
from number First op to be fetched.
to number Last op to be fetched. This is exclusive.

Returns

Return type: api.ISequencedDocumentMessage[]