Table of Contents

Interface IWorldPortalStateService

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

Service interface for portals opened for the whole world (world_portal_state).

public interface IWorldPortalStateService : IFetchCollectionByKeyAction<string, WorldPortalStateData>
Inherited Members

Remarks

Fetched per scene, because a scene server reads the rows of each scene it loads. Written by merge: see WorldPortalStateData.

Methods

MergeAsync(IEnumerable<WorldPortalStateData>, CancellationToken)

Merges openings into the stored rows: permanent ORs and active_until takes the later moment. Creates rows that do not exist yet.

Task<DatabaseResult> MergeAsync(IEnumerable<WorldPortalStateData> states, CancellationToken cancellationToken = default)

Parameters

states IEnumerable<WorldPortalStateData>

The openings to merge.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult>

Success, or the failure that stopped the whole batch.

Remarks

Idempotent: a retry after an ambiguous failure changes nothing.