1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-24 04:42:56 +01:00
Minecraft-Phantom-Panel/Server/Phantom.Server.Services/Agents/AgentJavaRuntimesManager.cs

16 lines
555 B
C#

using System.Collections.Immutable;
using Phantom.Common.Data.Java;
using Phantom.Utils.Collections;
namespace Phantom.Server.Services.Agents;
public sealed class AgentJavaRuntimesManager {
private readonly RwLockedDictionary<Guid, ImmutableArray<TaggedJavaRuntime>> runtimes = new (LockRecursionPolicy.NoRecursion);
public ImmutableDictionary<Guid, ImmutableArray<TaggedJavaRuntime>> All => runtimes.ToImmutable();
internal void Update(Guid agentGuid, ImmutableArray<TaggedJavaRuntime> runtimes) {
this.runtimes[agentGuid] = runtimes;
}
}