Skip to main content
Version: v1

@fluidframework/map Package

The map package provides interfaces and implementing classes for map-like distributed data structures.

Remarks

The following distributed data structures are defined in this package:

Interfaces

InterfaceDescription
IDirectoryInterface describing actions on a directory.
IDirectoryClearOperationOperation indicating the directory should be cleared.
IDirectoryCreateSubDirectoryOperationOperation indicating a subdirectory should be created.
IDirectoryDataObjectDefines the in-memory object structure to be used for the conversion to/from serialized.
IDirectoryDeleteOperationOperation indicating a key should be deleted from the directory.
IDirectoryDeleteSubDirectoryOperationOperation indicating a subdirectory should be deleted.
IDirectoryEventsEvents emitted in response to changes to the directory data.
IDirectoryNewStorageFormat
IDirectorySetOperationOperation indicating a value should be set for a key.
IDirectoryValueChangedType of "valueChanged" event parameter for SharedDirectory.
ILocalValueA local value to be stored in a container type DDS.
ISerializableValueThe _ready-for-serialization_ format of values contained in DDS contents. This allows us to use ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.
ISerializedValue
ISharedDirectoryInterface describing a shared directory.
ISharedDirectoryEventsEvents emitted in response to changes to the directory data. These events only emit on the ISharedDirectory itself, and not on subdirectories.
ISharedMapShared map interface
ISharedMapEventsEvents emitted in response to changes to the map data.
IValueChangedType of "valueChanged" event parameter.

Classes

ClassModifiersDescription
DirectoryFactorysealedThe factory that defines the directory.
LocalValueMakerA LocalValueMaker enables a container type DDS to produce and store local values with minimal awareness of how those objects are stored, serialized, and deserialized.
MapFactorysealedThe factory that defines the map.
SharedDirectorysealedSharedDirectory provides a hierarchical organization of map-like data structures as SubDirectories. The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax. SubDirectories can be retrieved for use as working directories.
SharedMapThe SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the Map built-in object. However, the keys of a SharedMap must be strings.

Types

TypeAliasDescription
IDirectoryKeyOperationAn operation on a specific key within a directory
IDirectoryOperationAny operation on a directory
IDirectoryStorageOperationAn operation on one or more of the keys within a directory
IDirectorySubDirectoryOperationAn operation on the subdirectories within a directory