Skip to main content
Version: v1

FileDocumentService Class

The DocumentService manages the different endpoints for connecting to underlying storage for file document service.

Signature​

export declare class FileDocumentService implements api.IDocumentService

Implements: api.IDocumentService

Constructors​

ConstructorDescription
(constructor)(storage, deltaStorage, deltaConnection)Constructs a new instance of the FileDocumentService class

Properties​

PropertyTypeDescription
resolvedUrlapi.IResolvedUrl

Methods​

MethodReturn TypeDescription
connectToDeltaStorage()Promise<api.IDocumentDeltaStorageService>
connectToDeltaStream(client)Promise<api.IDocumentDeltaConnection>Connects to a delta storage endpoint of provided documentService to get ops and then replaying them so as to mimic a delta stream endpoint.
connectToStorage()Promise<api.IDocumentStorageService>
dispose()void

Constructor Details​

(constructor)​

Constructs a new instance of the FileDocumentService class

Signature​

constructor(storage: api.IDocumentStorageService, deltaStorage: FileDeltaStorageService, deltaConnection: api.IDocumentDeltaConnection);

Parameters​

ParameterTypeDescription
storageapi.IDocumentStorageService
deltaStorageFileDeltaStorageService
deltaConnectionapi.IDocumentDeltaConnection

Property Details​

resolvedUrl​

Signature​

get resolvedUrl(): api.IResolvedUrl;

Type: api.IResolvedUrl

Method Details​

connectToDeltaStorage​

Signature​

connectToDeltaStorage(): Promise<api.IDocumentDeltaStorageService>;

Returns​

Return type: Promise<api.IDocumentDeltaStorageService>

connectToDeltaStream​

Connects to a delta storage endpoint of provided documentService to get ops and then replaying them so as to mimic a delta stream endpoint.

Signature​

connectToDeltaStream(client: IClient): Promise<api.IDocumentDeltaConnection>;

Parameters​

ParameterTypeDescription
clientIClientClient that connects to socket.

Returns​

returns the delta stream service.

Return type: Promise<api.IDocumentDeltaConnection>

connectToStorage​

Signature​

connectToStorage(): Promise<api.IDocumentStorageService>;

Returns​

Return type: Promise<api.IDocumentStorageService>

dispose​

Signature​

dispose(): void;