MockContainerRuntimeForReconnection Class
Specialized implementation of MockContainerRuntime for testing ops during reconnection. \
To use, import via @fluidframework/test-runtime-utils/legacy.
For more information about our API support guarantees, see here.
Signature
export declare class MockContainerRuntimeForReconnection extends MockContainerRuntime
Extends: MockContainerRuntime
Constructors
| Constructor | Alerts | Description |
|---|---|---|
| (constructor)(dataStoreRuntime, factory, runtimeOptions, overrides) | Beta |
Constructs a new instance of the MockContainerRuntimeForReconnection class |
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| connected | Beta |
boolean | Returns the connection state of the container runtime. Any messages that are submitted while not connected will be resubmitted via the resubmit flow on reconnection. Any messages received while disconnected will be processed on reconnection. Also, the clientId of the runtime will change on reconnection. | |
| factory | Beta |
readonly |
MockContainerRuntimeFactoryForReconnection | |
| pendingRemoteMessages | Beta |
readonly |
ISequencedDocumentMessage[] | Contains messages from other clients that were sequenced while this runtime was marked as disconnected. |
| processedOps | Beta |
optional, readonly |
ISequencedDocumentMessage[] |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| flush() | Beta |
void | |
| initializeWithStashedOps(fromContainerRuntime) | Beta |
Promise<void> | |
| process(message) | Beta |
void | |
| processPendingMessages(pendingMessages) | Beta |
void | |
| setConnectedState(connected) | Beta |
void | |
| submit(messageContent, localOpMetadata) | Beta |
number |
Constructor Details
(constructor)
Constructs a new instance of the MockContainerRuntimeForReconnection class
For more information about our API support guarantees, see here.
Signature
constructor(dataStoreRuntime: MockFluidDataStoreRuntime, factory: MockContainerRuntimeFactoryForReconnection, runtimeOptions?: IMockContainerRuntimeOptions, overrides?: {
minimumSequenceNumber?: number;
trackRemoteOps?: boolean;
});
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| dataStoreRuntime | MockFluidDataStoreRuntime | ||
| factory | MockContainerRuntimeFactoryForReconnection | ||
| runtimeOptions | optional | IMockContainerRuntimeOptions | |
| overrides | optional | { minimumSequenceNumber?: number; trackRemoteOps?: boolean; } |
Property Details
connected
Returns the connection state of the container runtime. Any messages that are submitted while not connected will be resubmitted via the resubmit flow on reconnection. Any messages received while disconnected will be processed on reconnection. Also, the clientId of the runtime will change on reconnection.
For more information about our API support guarantees, see here.
Signature
get connected(): boolean;
set connected(connected: boolean);
Type: boolean
factory
For more information about our API support guarantees, see here.
Signature
protected readonly factory: MockContainerRuntimeFactoryForReconnection;
Type: MockContainerRuntimeFactoryForReconnection
pendingRemoteMessages
Contains messages from other clients that were sequenced while this runtime was marked as disconnected.
For more information about our API support guarantees, see here.
Signature
protected readonly pendingRemoteMessages: ISequencedDocumentMessage[];
Type: ISequencedDocumentMessage[]
processedOps
For more information about our API support guarantees, see here.
Signature
protected readonly processedOps?: ISequencedDocumentMessage[];
Type: ISequencedDocumentMessage[]
Method Details
flush
For more information about our API support guarantees, see here.
Signature
flush(): void;
initializeWithStashedOps
For more information about our API support guarantees, see here.
Signature
initializeWithStashedOps(fromContainerRuntime: MockContainerRuntimeForReconnection): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| fromContainerRuntime | MockContainerRuntimeForReconnection |
Returns
Return type: Promise<void>
process
For more information about our API support guarantees, see here.
Signature
process(message: ISequencedDocumentMessage): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| message | ISequencedDocumentMessage |
processPendingMessages
For more information about our API support guarantees, see here.
Signature
protected processPendingMessages(pendingMessages: ISequencedDocumentMessage[]): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| pendingMessages | ISequencedDocumentMessage[] |
setConnectedState
For more information about our API support guarantees, see here.
Signature
protected setConnectedState(connected: boolean): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| connected | boolean |
submit
For more information about our API support guarantees, see here.
Signature
submit(messageContent: any, localOpMetadata: unknown): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| messageContent | any | |
| localOpMetadata | unknown |
Returns
Return type: number