IConsensusOrderedCollectionEvents Interface
Events notifying about addition, acquisition, release and completion of items
To use, import via @fluidframework/ordered-collection/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents
Extends: ISharedObjectEvents
Type Parameters
Parameter | Description |
---|---|
T |
Call Signatures
CallSignature | Alerts | Description |
---|---|---|
(event: "add", listener: (value: T, newlyAdded: boolean) => void): this | Alpha |
Event fires when new item is added to the queue or an item previously acquired is returned back to a queue (including client loosing connection) |
(event: "acquire", listener: (value: T, clientId?: string) => void): this | Alpha |
Event fires when a client acquired an item Fires both for locally acquired items, as well as items acquired by remote clients |
(event: "complete", listener: (value: T) => void): this | Alpha |
"Complete event fires when a client completes an item. |
(event: "localRelease", listener: (value: T, intentional: boolean) => void): this | Alpha |
Event fires when locally acquired item is being released back to the queue. Please note that release process is asynchronous, so it takes a while for it to happen ("add" event will be fired as result of it) |
Call Signature Details
(event: "add", listener: (value: T, newlyAdded: boolean) => void): this
Event fires when new item is added to the queue or an item previously acquired is returned back to a queue (including client loosing connection)
To use, import via @fluidframework/ordered-collection/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "add", listener: (value: T, newlyAdded: boolean) => void): this;
(event: "acquire", listener: (value: T, clientId?: string) => void): this
Event fires when a client acquired an item Fires both for locally acquired items, as well as items acquired by remote clients
To use, import via @fluidframework/ordered-collection/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "acquire", listener: (value: T, clientId?: string) => void): this;
(event: "complete", listener: (value: T) => void): this
"Complete event fires when a client completes an item.
To use, import via @fluidframework/ordered-collection/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "complete", listener: (value: T) => void): this;
(event: "localRelease", listener: (value: T, intentional: boolean) => void): this
Event fires when locally acquired item is being released back to the queue. Please note that release process is asynchronous, so it takes a while for it to happen ("add" event will be fired as result of it)
To use, import via @fluidframework/ordered-collection/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "localRelease", listener: (value: T, intentional: boolean) => void): this;