Skip to main content
Version: v1

ConsensusQueue Class

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

Type Parameters

Parameter Default Description
T any

Constructors

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

Static Methods

Method Return Type Description
create(runtime, id) ConsensusQueue<T> Create a new consensus queue
getFactory() IChannelFactory Get a factory for ConsensusQueue to register with the data store.

Constructor Details

(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

Parameter Type Description
id string
runtime IFluidDataStoreRuntime
attributes IChannelAttributes

Method Details

create

Create a new consensus queue

Signature

static create<T = any>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusQueue<T>;
Type Parameters
Parameter Default Description
T any

Parameters

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

Returns

newly create consensus queue (but not attached yet)

Return type: ConsensusQueue<T>

getFactory

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

Signature

static getFactory(): IChannelFactory;

Returns

a factory that creates and load ConsensusQueue

Return type: IChannelFactory