using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Session;
///
/// The single-instance : nothing is published and no session is held
/// anywhere but here, which is exactly the behaviour of a deployment without a shared store.
///
public sealed class NullSessionDirectory : ISessionDirectory
{
///
/// Gets the shared instance.
///
public static NullSessionDirectory Instance { get; } = new NullSessionDirectory();
///
public Task AllocateConnectionEpochAsync(string sessionId, CancellationToken cancellationToken = default)
=> Task.FromResult(0L);
///
public Task PublishAsync(SessionDirectoryEntry entry, long connectionEpoch, CancellationToken cancellationToken = default)
=> Task.FromResult(false);
///
public Task RemoveAsync(string sessionId, string ownerPod, CancellationToken cancellationToken = default)
=> Task.CompletedTask;
///
public Task GetAsync(string sessionId, CancellationToken cancellationToken = default)
=> Task.FromResult(null);
///
public Task> GetAllAsync(CancellationToken cancellationToken = default)
=> Task.FromResult>(Array.Empty());
}