Table of Contents

Class ListStore<T>

Namespace
Stride.Core.IO
Assembly
Stride.Core.Serialization.dll

A value store that will be incrementally saved on HDD. Thread-safe and process-safe.

public class ListStore<T> : Store<T>, IDisposable where T : new()

Type Parameters

T

The type of elements in the store.

Inheritance
ListStore<T>
Implements
Inherited Members
Extension Methods

Constructors

ListStore(Stream)

public ListStore(Stream stream)

Parameters

stream Stream

Fields

loadedIdMap

protected readonly List<T> loadedIdMap

Field Value

List<T>

unsavedIdMap

protected readonly LinkedList<ListStore<T>.UnsavedEntry> unsavedIdMap

Field Value

LinkedList<ListStore<T>.UnsavedEntry>

Methods

AddLoaded(T)

Adds a value that has already been saved in the store (saved state).

protected override void AddLoaded(T item)

Parameters

item T

The item.

AddUnsaved(T, int)

Adds a value that has not yet been saved in the store (pending state).

protected override void AddUnsaved(T item, int currentTransaction)

Parameters

item T

The item.

currentTransaction int

GetPendingItems(int)

Gets the list of pending items for a given transaction index.

protected override IEnumerable<T> GetPendingItems(int currentTransaction)

Parameters

currentTransaction int

Returns

IEnumerable<T>

GetValues()

public T[] GetValues()

Returns

T[]

RemoveUnsaved(IEnumerable<T>, int)

Removes values that have not yet been saved (pending state).

protected override void RemoveUnsaved(IEnumerable<T> items, int currentTransaction)

Parameters

items IEnumerable<T>

The items.

currentTransaction int

RemoveUnsaved(T, int)

Removes a value that has not yet been saved (pending state).

protected override void RemoveUnsaved(T item, int currentTransaction)

Parameters

item T

The item.

currentTransaction int