SharedIntervalCollection Class

Packages > @fluidframework/sequence > SharedIntervalCollection

Signature:

export declare class SharedIntervalCollection<TInterval extends ISerializableInterval = Interval> extends SharedObject implements ISharedIntervalCollection<TInterval> 

Extends: SharedObject

Implements: ISharedIntervalCollection<TInterval>

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(id, runtime, attributes) Constructs a new shared SharedIntervalCollection. If the object is non-local an id and service interfaces will be provided

Properties

List of properties for this class
Property Modifiers Type Description
[Symbol.toStringTag] string

Methods

List of methods on this class
Method Modifiers Description
applyStashedOp()
create(runtime, id) static Create a SharedIntervalCollection
getFactory() static Get a factory for SharedIntervalCollection to register with the data store.
getIntervalCollection(label)
getIntervalCollectionPath(label) Creates the full path of the intervalCollection label
loadCore(storage) Allows the distributed data type to perform custom loading
onDisconnect()
processCore(message, local, localOpMetadata)
registerCore()
resubmitCore(content, localOpMetadata)
snapshotCore(serializer)
waitIntervalCollection(label)

Constructors

SharedIntervalCollection.(constructor)

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

Signature:

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

Parameters

List of parameters
Parameter Type Description
id string
runtime IFluidDataStoreRuntime
attributes IChannelAttributes

Properties

[Symbol.toStringTag]

Signature:

readonly [Symbol.toStringTag]: string;

Methods

applyStashedOp

Signature:

protected applyStashedOp(): void;

Returns:

void

create

Create a SharedIntervalCollection

Signature:

static create(runtime: IFluidDataStoreRuntime, id?: string): SharedIntervalCollection<Interval>;

Parameters

List of parameters
Parameter Type Description
runtime IFluidDataStoreRuntime data store runtime the new shared map belongs to
id string optional name of the shared map

Returns:

SharedIntervalCollection<Interval>

newly create shared map (but not attached yet)

getFactory

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

Signature:

static getFactory(): IChannelFactory;

Returns:

IChannelFactory

a factory that creates and load SharedIntervalCollection

getIntervalCollection

Signature:

getIntervalCollection(label: string): IntervalCollection<TInterval>;

Parameters

List of parameters
Parameter Type Description
label string

Returns:

IntervalCollection<TInterval>

getIntervalCollectionPath

Creates the full path of the intervalCollection label

Signature:

protected getIntervalCollectionPath(label: string): string;

Parameters

List of parameters
Parameter Type Description
label string the incoming lable

Returns:

string

loadCore

Allows the distributed data type to perform custom loading

Signature:

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

Parameters

List of parameters
Parameter Type Description
storage IChannelStorageService

Returns:

Promise<void>

onDisconnect

Signature:

protected onDisconnect(): void;

Returns:

void

processCore

Signature:

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

Parameters

List of parameters
Parameter Type Description
message ISequencedDocumentMessage
local boolean
localOpMetadata unknown

Returns:

void

registerCore

Signature:

protected registerCore(): void;

Returns:

void

resubmitCore

Signature:

protected resubmitCore(content: any, localOpMetadata: unknown): void;

Parameters

List of parameters
Parameter Type Description
content any
localOpMetadata unknown

Returns:

void

snapshotCore

Signature:

protected snapshotCore(serializer: IFluidSerializer): ITree;

Parameters

List of parameters
Parameter Type Description
serializer IFluidSerializer

Returns:

ITree

waitIntervalCollection

Signature:

waitIntervalCollection(label: string): Promise<IntervalCollection<TInterval>>;

Parameters

List of parameters
Parameter Type Description
label string

Returns:

Promise<IntervalCollection<TInterval>>