Table of Contents

Class ProvinceHistoryDatabase

Namespace
Core.Data
Assembly
Core.dll

Cold data storage for province historical events Implements tiered history with compression to prevent unbounded growth Follows performance architecture: recent events + compressed history + statistics

public class ProvinceHistoryDatabase
Inheritance
object
ProvinceHistoryDatabase

Constructors

ProvinceHistoryDatabase()

public ProvinceHistoryDatabase()

Methods

AddEvent(int, HistoricalEvent)

Add historical event for province (bounded growth)

public void AddEvent(int provinceID, HistoricalEvent evt)

Parameters

provinceID int
evt HistoricalEvent

Dispose()

public void Dispose()

GetHistorySummary(int)

Get compressed historical summary for province

public ProvinceHistorySummary GetHistorySummary(int provinceID)

Parameters

provinceID int

Returns

ProvinceHistorySummary

GetRecentEvents(int, int)

Get recent events for province (bounded result)

public List<HistoricalEvent> GetRecentEvents(int provinceID, int maxCount = 20)

Parameters

provinceID int
maxCount int

Returns

List<HistoricalEvent>

GetStats()

Get memory usage statistics

public HistoryDatabaseStats GetStats()

Returns

HistoryDatabaseStats