Show / Hide Table of Contents

Class PartitionedData<TPartition, TEntry>

Partitioned data is used for high update frequency data such as Chat and Notifications. For each new day, a new data partition will be created and since each individual data partition is IStorage, they are saved separately and that heavily enhances serialization speed, because only the active partition needs to be saved on updates as the previous ones are locked.

Inheritance
System.Object
PartitionedData<TPartition, TEntry>
Implements
IDataPartition<TEntry>
Namespace: Eco.Gameplay.Utils
Assembly: Eco.Gameplay.dll
Syntax
public class PartitionedData<TPartition, TEntry> : Object, IDataPartition<TEntry> where TPartition : IStoredDataPartition<TEntry>, new()
    where TEntry : ISerializable, IHasCreationTime
Type Parameters
Name Description
TPartition
TEntry

Properties

NumEntries

Declaration
public int NumEntries { get; }
Property Value
Type Description
System.Int32

Methods

AddEntry(TEntry)

Declaration
public void AddEntry(TEntry entry)
Parameters
Type Name Description
TEntry entry

GetEnumerable()

Declaration
public IEnumerable<TEntry> GetEnumerable()
Returns
Type Description
System.Collections.Generic.IEnumerable<TEntry>

LoadOrCreate(String)

Loads data from storage or creates new.

Declaration
public static PartitionedData<TPartition, TEntry> LoadOrCreate(string folder)
Parameters
Type Name Description
System.String folder
Returns
Type Description
PartitionedData<TPartition, TEntry>

RemoveAll(Predicate<TEntry>)

Removes all entries matching predicate and returns number of removed entries.

Declaration
public int RemoveAll(Predicate<TEntry> predicate)
Parameters
Type Name Description
System.Predicate<TEntry> predicate
Returns
Type Description
System.Int32
Remarks

Removes entries from actual partitions by recursing the RemoveAll call into them.

Implements

IDataPartition<T>

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾