Class ProvinceHistoryDatabase
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
-
objectProvinceHistoryDatabase
Constructors
ProvinceHistoryDatabase()
public ProvinceHistoryDatabase()
Methods
AddEvent(int, HistoricalEvent)
Add historical event for province (bounded growth)
public void AddEvent(int provinceID, HistoricalEvent evt)
Parameters
provinceIDintevtHistoricalEvent
Dispose()
public void Dispose()
GetHistorySummary(int)
Get compressed historical summary for province
public ProvinceHistorySummary GetHistorySummary(int provinceID)
Parameters
provinceIDint
Returns
GetRecentEvents(int, int)
Get recent events for province (bounded result)
public List<HistoricalEvent> GetRecentEvents(int provinceID, int maxCount = 20)
Parameters
provinceIDintmaxCountint
Returns
- List<HistoricalEvent>
GetStats()
Get memory usage statistics
public HistoryDatabaseStats GetStats()