MockFluidDataStoreRuntime Class
Mock implementation of IRuntime for testing that does nothing
Signature
export declare class MockFluidDataStoreRuntime extends EventEmitter implements IFluidDataStoreRuntime, IFluidDataStoreChannel, IFluidHandleContext
Extends: EventEmitter
Implements: IFluidDataStoreRuntime, IFluidDataStoreChannel, IFluidHandleContext
Properties
Property | Type | Description |
---|---|---|
absolutePath | string | |
attachState | AttachState | |
channelsRoutingContext | IFluidHandleContext | |
clientId | string | undefined | |
connected | ||
deltaManager | MockDeltaManager | |
disposed | boolean | |
documentId | string | |
existing | boolean | |
id | string | |
IFluidHandleContext | IFluidHandleContext | |
IFluidRouter | this | |
isAttached | boolean | |
loader | ILoader | |
local | boolean | |
logger | ITelemetryLogger | |
objectsRoutingContext | IFluidHandleContext | |
options | ILoaderOptions | |
path | ||
quorum | MockQuorumClients | |
rootRoutingContext | IFluidHandleContext |
Methods
Property Details
absolutePath
Signature
get absolutePath(): string;
Type: string
attachState
Signature
get attachState(): AttachState;
Type: AttachState
channelsRoutingContext
Signature
get channelsRoutingContext(): IFluidHandleContext;
Type: IFluidHandleContext
clientId
Signature
clientId: string | undefined;
Type: string | undefined
connected
Signature
readonly connected = true;
deltaManager
Signature
deltaManager: MockDeltaManager;
Type: MockDeltaManager
disposed
Signature
get disposed(): boolean;
Type: boolean
documentId
Signature
readonly documentId: string;
Type: string
existing
Signature
readonly existing: boolean;
Type: boolean
id
Signature
readonly id: string;
Type: string
IFluidHandleContext
Signature
get IFluidHandleContext(): IFluidHandleContext;
Type: IFluidHandleContext
IFluidRouter
Signature
get IFluidRouter(): this;
Type: this
isAttached
Signature
get isAttached(): boolean;
Type: boolean
loader
Signature
readonly loader: ILoader;
Type: ILoader
local
Signature
get local(): boolean;
set local(local: boolean);
Type: boolean
logger
Signature
readonly logger: ITelemetryLogger;
Type: ITelemetryLogger
objectsRoutingContext
Signature
get objectsRoutingContext(): IFluidHandleContext;
Type: IFluidHandleContext
options
Signature
options: ILoaderOptions;
Type: ILoaderOptions
path
Signature
readonly path = "";
quorum
Signature
quorum: MockQuorumClients;
Type: MockQuorumClients
rootRoutingContext
Signature
get rootRoutingContext(): IFluidHandleContext;
Type: IFluidHandleContext
Method Details
addedGCOutboundReference
Signature
addedGCOutboundReference(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
Parameters
Parameter | Type | Description |
---|---|---|
srcHandle | IFluidHandle | |
outboundHandle | IFluidHandle |
applyStashedOp
Signature
applyStashedOp(content: any): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
content | any |
Returns
Return type: Promise<void>
attachGraph
Signature
attachGraph(): void;
bind
Signature
bind(handle: IFluidHandle): void;
Parameters
Parameter | Type | Description |
---|---|---|
handle | IFluidHandle |
bindChannel
Signature
bindChannel(channel: IChannel): void;
Parameters
Parameter | Type | Description |
---|---|---|
channel | IChannel |
bindToContext
Signature
bindToContext(): void;
close
Signature
close(): Promise<void>;
Returns
Return type: Promise<void>
createChannel
Signature
createChannel(id: string, type: string): IChannel;
Parameters
Parameter | Type | Description |
---|---|---|
id | string | |
type | string |
Returns
Return type: IChannel
dispose
Signature
dispose(): void;
getAttachSnapshot
Signature
getAttachSnapshot(): ITreeEntry[];
Returns
Return type: ITreeEntry[]
getAttachSummary
Signature
getAttachSummary(): ISummaryTreeWithStats;
Returns
Return type: ISummaryTreeWithStats
getAudience
Signature
getAudience(): IAudience;
Returns
Return type: IAudience
getBlob
Signature
getBlob(blobId: string): Promise<any>;
Parameters
Parameter | Type | Description |
---|---|---|
blobId | string |
Returns
Return type: Promise<any>
getChannel
Signature
getChannel(id: string): Promise<IChannel>;
Parameters
Parameter | Type | Description |
---|---|---|
id | string |
Returns
Return type: Promise<IChannel>
getGCData
Signature
getGCData(): Promise<IGarbageCollectionData>;
Returns
Return type: Promise<IGarbageCollectionData>
getQuorum
Signature
getQuorum(): IQuorumClients;
Returns
Return type: IQuorumClients
process
Signature
process(message: ISequencedDocumentMessage, local: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
message | ISequencedDocumentMessage | |
local | boolean |
processSignal
Signature
processSignal(message: any, local: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
message | any | |
local | boolean |
request
Signature
request(request: IRequest): Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest |
Returns
Return type: Promise<IResponse>
requestDataStore
Signature
requestDataStore(request: IRequest): Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest |
Returns
Return type: Promise<IResponse>
resolveHandle
Signature
resolveHandle(request: IRequest): Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest |
Returns
Return type: Promise<IResponse>
reSubmit
Signature
reSubmit(content: any, localOpMetadata: unknown): void;
Parameters
Parameter | Type | Description |
---|---|---|
content | any | |
localOpMetadata | unknown |
rollback
Signature
rollback?(message: any, localOpMetadata: unknown): void;
Parameters
Parameter | Type | Description |
---|---|---|
message | any | |
localOpMetadata | unknown |
save
Signature
save(message: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
message | string |
setAttachState
Signature
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
Parameters
Parameter | Type | Description |
---|---|---|
attachState | AttachState.Attaching | AttachState.Attached |
setConnectionState
Signature
setConnectionState(connected: boolean, clientId?: string): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
connected | boolean | ||
clientId | optional | string |
submitMessage
Signature
submitMessage(type: MessageType, content: any): null;
Parameters
Parameter | Type | Description |
---|---|---|
type | MessageType | |
content | any |
Returns
Return type: null
submitSignal
Signature
submitSignal(type: string, content: any): null;
Parameters
Parameter | Type | Description |
---|---|---|
type | string | |
content | any |
Returns
Return type: null
summarize
Signature
summarize(fullTree?: boolean, trackState?: boolean): Promise<ISummaryTreeWithStats>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
fullTree | optional | boolean | |
trackState | optional | boolean |
Returns
Return type: Promise<ISummaryTreeWithStats>
updateMinSequenceNumber
Signature
updateMinSequenceNumber(value: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
value | number |
updateUsedRoutes
Signature
updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
usedRoutes | string[] | ||
gcTimestamp | optional | number |
uploadBlob
Signature
uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;
Parameters
Parameter | Type | Description |
---|---|---|
blob | ArrayBufferLike |
Returns
Return type: Promise<IFluidHandle<ArrayBufferLike>>
waitAttached
Signature
waitAttached(): Promise<void>;
Returns
Return type: Promise<void>