Skip to main content
Version: v1

SharedSummaryBlock Class

Implementation of a shared summary block. It does not generate any ops. It is only part of the summary. Data should be set in this object in response to a remote op.

Signature​

export declare class SharedSummaryBlock extends SharedObject implements ISharedSummaryBlock

Extends: SharedObject

Implements: ISharedSummaryBlock

Constructors​

ConstructorDescription
(constructor)(id, runtime, attributes)Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will be provided.

Static Methods​

MethodReturn TypeDescription
create(runtime, id)SharedSummaryBlockCreate a new shared summary block
getFactory()IChannelFactoryGet a factory for SharedSummaryBlock to register with the data store.

Methods​

MethodReturn TypeDescription
applyStashedOp()void
get(key)Jsonable<T>Retrieves the given key from the map.
loadCore(storage)Promise<void>
onDisconnect()void
processCore(message, local)void
set(key, value)voidSets the value stored at key to the provided value.
summarizeCore(serializer)ISummaryTreeWithStatsGets a form of the object that can be serialized.

Constructor Details​

(constructor)​

Constructs a new SharedSummaryBlock. If the object is non-local, an id and service interfaces will be provided.

Signature​

constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);

Parameters​

ParameterTypeDescription
idstringoptional name of the shared summary block.
runtimeIFluidDataStoreRuntimedata store runtime thee object belongs to.
attributesIChannelAttributesThe attributes for the object.

Method Details​

applyStashedOp​

Signature​

protected applyStashedOp(): void;

create​

Create a new shared summary block

Signature​

static create(runtime: IFluidDataStoreRuntime, id?: string): SharedSummaryBlock;

Parameters​

ParameterModifiersTypeDescription
runtimeIFluidDataStoreRuntimedata store runtime the new shared summary block belongs to.
idoptionalstringoptional name of the shared summary block.

Returns​

newly created shared summary block (but not attached yet).

Return type: SharedSummaryBlock

get​

Retrieves the given key from the map.

Signature​

get<T>(key: string): Jsonable<T>;
Type Parameters​
ParameterDescription
T

Parameters​

ParameterTypeDescription
keystringKey to retrieve from.

Returns​

The stored value, or undefined if the key is not set.

Return type: Jsonable<T>

getFactory​

Get a factory for SharedSummaryBlock to register with the data store.

Signature​

static getFactory(): IChannelFactory;

Returns​

a factory that creates and loads SharedSummaryBlock.

Return type: IChannelFactory

loadCore​

Signature​

protected loadCore(storage: IChannelStorageService): Promise<void>;

Parameters​

ParameterTypeDescription
storageIChannelStorageService

Returns​

Return type: Promise<void>

onDisconnect​

Signature​

protected onDisconnect(): void;

processCore​

Signature​

protected processCore(message: ISequencedDocumentMessage, local: boolean): void;

Parameters​

ParameterTypeDescription
messageISequencedDocumentMessage
localboolean

set​

Sets the value stored at key to the provided value.

Signature​

set<T>(key: string, value: Jsonable<T>): void;
Type Parameters​
ParameterDescription
T

Parameters​

ParameterTypeDescription
keystringKey to set at.
valueJsonable<T>Jsonable type value to set.

summarizeCore​

Gets a form of the object that can be serialized.

Signature​

protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;

Parameters​

ParameterTypeDescription
serializerIFluidSerializer

Returns​

A tree representing the snapshot of the shared object.

Return type: ISummaryTreeWithStats