ReplayDocumentService Class
The Replay document service dummies out the snapshot and the delta storage. Delta connection simulates the socket by fetching the ops from delta storage and emitting them with a pre determined delay
Signature
export declare class ReplayDocumentService implements api.IDocumentService
Implements: api.IDocumentService
Constructors
Constructor | Description |
---|---|
(constructor)(controller, deltaStorage) | Constructs a new instance of the ReplayDocumentService class |
Static Methods
Method | Return Type | Description |
---|---|---|
create(documentService, controller) | Promise<api.IDocumentService> |
Properties
Property | Type | Description |
---|---|---|
resolvedUrl | api.IResolvedUrl |
Methods
Method | Return Type | Description |
---|---|---|
connectToDeltaStorage() | Promise<api.IDocumentDeltaStorageService> | Connects to a delta storage endpoint for getting ops between a range. |
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> | Connects to a storage endpoint for snapshot service and blobs. |
dispose() | void |
Constructor Details
(constructor)
Constructs a new instance of the ReplayDocumentService
class
Signature
constructor(controller: api.IDocumentStorageService, deltaStorage: api.IDocumentDeltaConnection);
Parameters
Parameter | Type | Description |
---|---|---|
controller | api.IDocumentStorageService | |
deltaStorage | api.IDocumentDeltaConnection |
Property Details
resolvedUrl
Signature
get resolvedUrl(): api.IResolvedUrl;
Type: api.IResolvedUrl
Method Details
connectToDeltaStorage
Connects to a delta storage endpoint for getting ops between a range.
Signature
connectToDeltaStorage(): Promise<api.IDocumentDeltaStorageService>;
Returns
returns the dummy document delta storage service for replay driver.
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
Parameter | Type | Description |
---|---|---|
client | IClient | Client that connects to socket. |
Returns
returns the delta stream service which replay ops from --from to --to arguments.
Return type: Promise<api.IDocumentDeltaConnection>
connectToStorage
Connects to a storage endpoint for snapshot service and blobs.
Signature
connectToStorage(): Promise<api.IDocumentStorageService>;
Returns
returns the dummy document storage service for replay driver.
Return type: Promise<api.IDocumentStorageService>
create
Signature
static create(documentService: api.IDocumentService, controller: ReplayController): Promise<api.IDocumentService>;
Parameters
Parameter | Type | Description |
---|---|---|
documentService | api.IDocumentService | |
controller | ReplayController |
Returns
Return type: Promise<api.IDocumentService>
dispose
Signature
dispose(): void;