ConsensusQueue Class

Packages > @fluidframework/ordered-collection > ConsensusQueue

Implementation of a consensus stack

An derived type of ConsensusOrderedCollection with a queue as the backing data and order.

Signature:

export declare class ConsensusQueue<T = any> extends ConsensusOrderedCollection<T> 

Extends: ConsensusOrderedCollection<T>

Constructors

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

Methods

List of methods on this class
Method Modifiers Description
create(runtime, id) static Create a new consensus queue
getFactory() static Get a factory for ConsensusQueue to register with the data store.

Constructors

ConsensusQueue.(constructor)

Constructs a new consensus queue. 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

Methods

create

Create a new consensus queue

Signature:

static create<T = any>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusQueue<T>;

Parameters

List of parameters
Parameter Type Description
runtime IFluidDataStoreRuntime data store runtime the new consensus queue belongs to
id string optional name of theconsensus queue

Returns:

ConsensusQueue<T>

newly create consensus queue (but not attached yet)

getFactory

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

Signature:

static getFactory(): IChannelFactory;

Returns:

IChannelFactory

a factory that creates and load ConsensusQueue