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

ParameterDefaultDescription
Tany

Constructors

ConstructorDescription
(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

MethodReturn TypeDescription
create(runtime, id)ConsensusQueue<T>Create a new consensus queue
getFactory()IChannelFactoryGet 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

ParameterTypeDescription
idstring
runtimeIFluidDataStoreRuntime
attributesIChannelAttributes

Method Details

create

Create a new consensus queue

Signature

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

Parameters

ParameterModifiersTypeDescription
runtimeIFluidDataStoreRuntimedata store runtime the new consensus queue belongs to
idoptionalstringoptional 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