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​

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

Properties​

PropertyTypeDescription
opsreadonly Readonly<api.ISequencedDocumentMessage>[]

Methods​

MethodReturn TypeDescription
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​

ParameterTypeDescription
pathstring

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​

ParameterModifiersTypeDescription
fromnumber
tonumber | undefined
abortSignaloptionalAbortSignal
cachedOnlyoptionalboolean

Returns​

Return type: IStream<api.ISequencedDocumentMessage[]>

getFromWebSocket​

Retrieve ops within the exclusive sequence number range.

Signature​

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

Parameters​

ParameterTypeDescription
fromnumberFirst op to be fetched.
tonumberLast op to be fetched. This is exclusive.

Returns​

Return type: api.ISequencedDocumentMessage[]