Skip to main content
Version: v2

IDeltaQueue Interface

Queue of ops to be sent to or processed from storage

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-definitions/legacy.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature​

/** @sealed */
export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable

Extends: IEventProvider<IDeltaQueueEvents<T>>, IDisposable

Type Parameters​

ParameterDescription
T

Properties​

PropertyAlertsTypeDescription
idleBetabooleanFlag indicating whether or not the queue is idle. I.e. there are no remaining messages to processes.
lengthBetanumberThe number of messages remaining in the queue
pausedBetabooleanFlag indicating whether or not the queue was paused

Methods​

MethodAlertsReturn TypeDescription
pause()BetaPromise<void>Pauses processing on the queue.
peek()BetaT | undefinedPeeks at the next message in the queue
resume()BetavoidResumes processing on the queue
toArray()BetaT[]Returns all the items in the queue as an array. Does not remove them from the queue.
waitTillProcessingDone()BetaPromise<{ count: number; duration: number; }>returns number of ops processed and time it took to process these ops. Zeros if queue did not process anything (had no messages, was paused or had hit an error before)

Property Details​

idle​

Flag indicating whether or not the queue is idle. I.e. there are no remaining messages to processes.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

idle: boolean;

Type: boolean

length​

The number of messages remaining in the queue

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

length: number;

Type: number

paused​

Flag indicating whether or not the queue was paused

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

paused: boolean;

Type: boolean

Method Details​

pause​

Pauses processing on the queue.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

pause(): Promise<void>;

Returns​

A promise which resolves when processing has been paused.

Return type: Promise<void>

peek​

Peeks at the next message in the queue

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

peek(): T | undefined;

Returns​

Return type: T | undefined

resume​

Resumes processing on the queue

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

resume(): void;

toArray​

Returns all the items in the queue as an array. Does not remove them from the queue.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

toArray(): T[];

Returns​

Return type: T[]

waitTillProcessingDone​

returns number of ops processed and time it took to process these ops. Zeros if queue did not process anything (had no messages, was paused or had hit an error before)

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

waitTillProcessingDone(): Promise<{
count: number;
duration: number;
}>;

Returns​

Return type: Promise<{ count: number; duration: number; }>