77e30685bb
- Implements Phases 3–6: session isolation, cache coordination, primary election, and file system monitor coordination for Jellyfin with PostgreSQL. - Adds new database entities (Instance, DistributedLock, FileSystemChange) and EF model configurations. - Includes SQL migration scripts and EF migration for all required tables, columns, and helper functions. - Updates Device entity and JellyfinDbContext for multi-instance tracking. - Integrates new DI services for instance registry, distributed locks, cache coordinator, and primary election. - Adds publishing profiles (Win/Linux/FrameworkDependent) and automation script for deployment. - Extensive documentation for architecture, setup, and publishing. - All changes are backward compatible and build successfully.
40 lines
1.8 KiB
C#
40 lines
1.8 KiB
C#
// <copyright file="IFileSystemChangeProcessor.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Server.Implementations.Clustering
|
|
{
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
/// <summary>
|
|
/// Service that processes file system changes from the database (primary instance only).
|
|
/// </summary>
|
|
public interface IFileSystemChangeProcessor
|
|
{
|
|
/// <summary>
|
|
/// Starts the file system change processor.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
Task StartAsync(CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Stops the file system change processor.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
Task StopAsync(CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Records a file system change to the database.
|
|
/// </summary>
|
|
/// <param name="path">The path that changed.</param>
|
|
/// <param name="changeType">The type of change (Created, Modified, Deleted, Renamed).</param>
|
|
/// <param name="oldPath">The old path for rename operations.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
Task RecordChangeAsync(string path, string changeType, string? oldPath = null, CancellationToken cancellationToken = default);
|
|
}
|
|
}
|