DebugReplayController Class
Replay controller that uses pop-up window to control op playback
Signature
export declare class DebugReplayController extends ReplayController implements IDebuggerController
Extends: ReplayController
Implements: IDebuggerController
Static Properties
Property | Type | Description |
---|---|---|
WindowClosedSeq |
Static Methods
Method | Return Type | Description |
---|---|---|
create(createUi) | DebugReplayController | null | |
seqFromTree(documentStorageService, tree) | Promise<number> |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
documentService | optional |
IDocumentService | |
documentStorageService | optional |
IDocumentStorageService | |
lastOpReached | boolean | ||
retryFetchOpsOnEndOfFile | boolean | ||
startSeqDeferred | Deferred<number> | ||
stepsDeferred | optional |
Deferred<number> | |
stepsToPlay | number | ||
storage | optional |
ReadDocumentStorageServiceBase | |
ui | IDebuggerUI | ||
versionCount | number | ||
versions | IVersion[] |
Methods
Method | Return Type | Description |
---|---|---|
connectToUi(ui) | void | |
downloadVersionInfo(documentStorageService, prevRequest, index, version) | Promise<void> | |
fetchTo(currentOp) | number | undefined | |
getSnapshotTree(versionRequested) | Promise<ISnapshotTree | null> | |
getStartingOpSequence() | Promise<number> | |
getVersions(versionId, count) | Promise<IVersion[]> | |
initStorage(documentService) | Promise<boolean> | |
isDoneFetch(currentOp, lastTimeStamp) | boolean | Return true if we are done processing ops |
isSelectionMade() | boolean | |
onClose() | void | |
onDownloadOpsButtonClick(anonymize) | Promise<string> | |
onOpButtonClick(steps) | void | |
onSnapshotFileSelection(file) | void | |
onVersionSelection(version) | Promise<void> | |
readBlob(blobId) | Promise<ArrayBufferLike> | |
replay(emitter, fetchedOps) | Promise<void> | |
resolveStorage(seq, storage, version) | void |
Property Details
documentService
Signature
protected documentService?: IDocumentService;
Type: IDocumentService
documentStorageService
Signature
protected documentStorageService?: IDocumentStorageService;
Type: IDocumentStorageService
lastOpReached
Signature
protected lastOpReached: boolean;
Type: boolean
retryFetchOpsOnEndOfFile
Signature
protected retryFetchOpsOnEndOfFile: boolean;
Type: boolean
startSeqDeferred
Signature
protected startSeqDeferred: Deferred<number>;
Type: Deferred<number>
stepsDeferred
Signature
protected stepsDeferred?: Deferred<number>;
Type: Deferred<number>
stepsToPlay
Signature
protected stepsToPlay: number;
Type: number
storage
Signature
protected storage?: ReadDocumentStorageServiceBase;
Type: ReadDocumentStorageServiceBase
ui
Signature
protected ui: IDebuggerUI;
Type: IDebuggerUI
versionCount
Signature
protected versionCount: number;
Type: number
versions
Signature
protected versions: IVersion[];
Type: IVersion[]
WindowClosedSeq
Signature
protected static readonly WindowClosedSeq = -1;
Method Details
connectToUi
Signature
connectToUi(ui: IDebuggerUI): void;
Parameters
Parameter | Type | Description |
---|---|---|
ui | IDebuggerUI |
create
Signature
static create(createUi: debuggerUIFactory): DebugReplayController | null;
Parameters
Parameter | Type | Description |
---|---|---|
createUi | debuggerUIFactory |
Returns
Return type: DebugReplayController | null
downloadVersionInfo
Signature
downloadVersionInfo(documentStorageService: IDocumentStorageService, prevRequest: Promise<void>, index: number, version: IVersion): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
documentStorageService | IDocumentStorageService | |
prevRequest | Promise<void> | |
index | number | |
version | IVersion |
Returns
Return type: Promise<void>
fetchTo
Signature
fetchTo(currentOp: number): number | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
currentOp | number |
Returns
Return type: number | undefined
getSnapshotTree
Signature
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
versionRequested | optional | IVersion |
Returns
Return type: Promise<ISnapshotTree | null>
getStartingOpSequence
Signature
getStartingOpSequence(): Promise<number>;
Returns
Return type: Promise<number>
getVersions
Signature
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
Parameters
Parameter | Type | Description |
---|---|---|
versionId | string | null | |
count | number |
Returns
Return type: Promise<IVersion[]>
initStorage
Signature
initStorage(documentService: IDocumentService): Promise<boolean>;
Parameters
Parameter | Type | Description |
---|---|---|
documentService | IDocumentService |
Returns
Return type: Promise<boolean>
isDoneFetch
Return true if we are done processing ops
Signature
isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
currentOp | number | ||
lastTimeStamp | optional | number |
Returns
Return type: boolean
isSelectionMade
Signature
isSelectionMade(): boolean;
Returns
Return type: boolean
onClose
Signature
onClose(): void;
onDownloadOpsButtonClick
Signature
onDownloadOpsButtonClick(anonymize: boolean): Promise<string>;
Parameters
Parameter | Type | Description |
---|---|---|
anonymize | boolean |
Returns
Return type: Promise<string>
onOpButtonClick
Signature
onOpButtonClick(steps: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
steps | number |
onSnapshotFileSelection
Signature
onSnapshotFileSelection(file: File): void;
Parameters
Parameter | Type | Description |
---|---|---|
file | File |
onVersionSelection
Signature
onVersionSelection(version: IVersion): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
version | IVersion |
Returns
Return type: Promise<void>
readBlob
Signature
readBlob(blobId: string): Promise<ArrayBufferLike>;
Parameters
Parameter | Type | Description |
---|---|---|
blobId | string |
Returns
Return type: Promise<ArrayBufferLike>
replay
Signature
replay(emitter: (op: ISequencedDocumentMessage[]) => void, fetchedOps: ISequencedDocumentMessage[]): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
emitter | (op: ISequencedDocumentMessage[]) => void | |
fetchedOps | ISequencedDocumentMessage[] |
Returns
Return type: Promise<void>
resolveStorage
Signature
protected resolveStorage(seq: number, storage: ReadDocumentStorageServiceBase, version: IVersion | string): void;
Parameters
Parameter | Type | Description |
---|---|---|
seq | number | |
storage | ReadDocumentStorageServiceBase | |
version | IVersion | string |
seqFromTree
Signature
protected static seqFromTree(documentStorageService: IDocumentStorageService, tree: ISnapshotTree | null): Promise<number>;
Parameters
Parameter | Type | Description |
---|---|---|
documentStorageService | IDocumentStorageService | |
tree | ISnapshotTree | null |
Returns
Return type: Promise<number>