초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StackExchange.Redis;
using ServerCore;
namespace ServerBase;
public class ServerMetricsManager : Singleton<ServerMetricsManager>
{
public static readonly int KEEP_SERVER_UPDATE_INTERVAL_MSEC = (10 * 1000);
private ServerMetricsCacheRequest? m_server_Metrics_handler;
private ConcurrentDictionary<string, ServerMetricsCacheRequest.CacheServerKey> m_cache_server_keys = new();
private bool m_is_setup_completed = false;
public Result setup(RedisConnector redisConnector)
{
var result = new Result();
m_server_Metrics_handler = new ServerMetricsHandler(this, redisConnector);
m_is_setup_completed = true;
return result;
}
public ServerMetricsCacheRequest getServerMetricsCacheRequest()
{
NullReferenceCheckHelper.throwIfNull(m_server_Metrics_handler, () => $"found_request is null !!!");
return m_server_Metrics_handler;
}
public bool isSetupCompleted() => m_is_setup_completed;
public ConcurrentDictionary<string, ServerMetricsCacheRequest.CacheServerKey> getCacheServers() => m_cache_server_keys;
}