Skip to content 

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
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(branchId, storage)
onDisconnect()
processCore(message, local, localOpMetadata)
registerCore()
reSubmitCore(content, localOpMetadata)
snapshot()
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

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

Signature:

protected loadCore(branchId: string | undefined, storage: IChannelStorageService): Promise<void>;

Parameters

List of parameters
Parameter Type Description
branchId string | undefined
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

snapshot

Signature:

snapshot(): ITree;

Returns:

ITree

waitIntervalCollection

Signature:

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

Parameters

List of parameters
Parameter Type Description
label string

Returns:

Promise<IntervalCollection<TInterval>>