Table of Contents

Interface IPlotUpdateService

Namespace
FishMMO.Database.Npgsql.Services.Interfaces
Assembly
FishMMO-DB.dll

Records when plots change, so scene servers hosting other channels can notice.

public interface IPlotUpdateService

Methods

DeleteAsync(long, CancellationToken)

Removes the update record for a plot.

Task<DatabaseResult<int>> DeleteAsync(long plotID, CancellationToken cancellationToken = default)

Parameters

plotID long
cancellationToken CancellationToken

Returns

Task<DatabaseResult<int>>

FetchAsync(List<long>, DateTime, CancellationToken)

Fetches the plots among plotIDs that changed at or after lastFetch.

Task<DatabaseResult<List<PlotUpdateData>>> FetchAsync(List<long> plotIDs, DateTime lastFetch, CancellationToken cancellationToken = default)

Parameters

plotIDs List<long>
lastFetch DateTime
cancellationToken CancellationToken

Returns

Task<DatabaseResult<List<PlotUpdateData>>>

PersistAsync(long, CancellationToken)

Marks a plot as changed as of now.

Task<DatabaseResult> PersistAsync(long plotID, CancellationToken cancellationToken = default)

Parameters

plotID long
cancellationToken CancellationToken

Returns

Task<DatabaseResult>