Skip to main content

SharedObjectCore Class

Base class from which all shared objects derive.

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

To use, import via @fluidframework/shared-object-base/legacy.

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

Signature

export declare abstract class SharedObjectCore<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends EventEmitterWithErrorHandling<TEvent> implements ISharedObject<TEvent>

Extends: EventEmitterWithErrorHandling<TEvent>

Implements: ISharedObject<TEvent>

Type Parameters

Parameter Constraint Default Description
TEvent ISharedObjectEvents ISharedObjectEvents

Remarks

This class implements common behaviors that implementations of ISharedObject may want to reuse. Even more such behaviors are implemented in the SharedObject class.

Constructors

Constructor Alerts Description
(constructor)(id, runtime, attributes) Alpha Constructs a new instance of the SharedObjectCore class

Properties

Property Alerts Modifiers Type Description
attributes Alpha readonly IChannelAttributes The attributes of the Shared Object.
connected Alpha readonly boolean Gets the connection state
deltaManager Alpha readonly IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> Accessor for this.runtime's deltaManager as a @fluidframework/container-definitions/internal#IDeltaManager
handle Alpha readonly IFluidHandleInternal The handle referring to this SharedObject
id Alpha string The ID of the shared object.
IFluidLoadable Alpha readonly this
logger Alpha readonly ITelemetryLoggerExt Telemetry logger for the shared object
runtime Alpha IFluidDataStoreRuntime The runtime instance that contains the Shared Object.
serializer Alpha readonly IFluidSerializer The serializer to serialize / parse handles.

Constructor Details

(constructor)

Constructs a new instance of the SharedObjectCore class

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
constructor(
id: string,
runtime: IFluidDataStoreRuntime,
attributes: IChannelAttributes);

Parameters

Parameter Type Description
id string
runtime IFluidDataStoreRuntime
attributes IChannelAttributes

Property Details

attributes

The attributes of the Shared Object.

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
readonly attributes: IChannelAttributes;

Type: IChannelAttributes

connected

Gets the connection state

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
get connected(): boolean;

Type: boolean

deltaManager

Accessor for this.runtime's deltaManager as a @fluidframework/container-definitions/internal#IDeltaManager

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
protected get deltaManager(): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;

Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>

handle

The handle referring to this SharedObject

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
readonly handle: IFluidHandleInternal;

Type: IFluidHandleInternal

id

The ID of the shared object.

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
id: string;

Type: string

IFluidLoadable

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
get IFluidLoadable(): this;

Type: this

logger

Telemetry logger for the shared object

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
protected readonly logger: ITelemetryLoggerExt;

Type: ITelemetryLoggerExt

runtime

The runtime instance that contains the Shared Object.

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
protected runtime: IFluidDataStoreRuntime;

Type: IFluidDataStoreRuntime

serializer

The serializer to serialize / parse handles.

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
protected abstract get serializer(): IFluidSerializer;

Type: IFluidSerializer