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.
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
// <copyright file="PrimaryInstanceChangedEventArgs.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Server.Implementations.Clustering
|
|
{
|
|
using System;
|
|
|
|
/// <summary>
|
|
/// Event arguments for when the primary instance changes.
|
|
/// </summary>
|
|
public class PrimaryInstanceChangedEventArgs : EventArgs
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="PrimaryInstanceChangedEventArgs"/> class.
|
|
/// </summary>
|
|
/// <param name="previousPrimaryId">The previous primary instance ID.</param>
|
|
/// <param name="newPrimaryId">The new primary instance ID.</param>
|
|
/// <param name="isCurrentInstance">Whether the current instance is now primary.</param>
|
|
public PrimaryInstanceChangedEventArgs(Guid? previousPrimaryId, Guid? newPrimaryId, bool isCurrentInstance)
|
|
{
|
|
PreviousPrimaryId = previousPrimaryId;
|
|
NewPrimaryId = newPrimaryId;
|
|
IsCurrentInstance = isCurrentInstance;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the previous primary instance ID.
|
|
/// </summary>
|
|
public Guid? PreviousPrimaryId { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the new primary instance ID.
|
|
/// </summary>
|
|
public Guid? NewPrimaryId { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether the current instance is now the primary.
|
|
/// </summary>
|
|
public bool IsCurrentInstance { get; }
|
|
}
|
|
}
|