예제 #1
0
        private static void Initialize_impl(string config_file = null)
        {
            lock (s_storage_init_lock)
            {
                if (s_master_init_flag)
                {
                    return;
                }

                TrinityC.Init();

                if (config_file != null)
                {
                    TrinityConfig.LoadConfig(config_file);
                }
                else
                {
                    TrinityConfig.EnsureConfig();
                }

                Log.Initialize();

                _LoadGraphEngineExtensions();
                _ScanForTSLStorageExtension();
                _ScanForMemoryCloudExtension();
                _ScanForStartupTasks();
                s_master_init_flag = true;
                BackgroundThread.Start();

                if (TrinityErrorCode.E_SUCCESS != StartEventLoop())
                {
                    throw new Exception("Cannot start worker thread pool");
                }
            }
            try
            {
                Initialized();
            }
            catch
            {
                //TODO log
            }
        }
예제 #2
0
        private static void Initialize_impl(string config_file = null)
        {
            lock (s_storage_init_lock)
            {
                if (s_master_init_flag)
                {
                    return;
                }

                TrinityC.Init();

                if (config_file != null)
                {
                    TrinityConfig.LoadConfig(config_file);
                }
                else
                {
                    TrinityConfig.EnsureConfig();
                }

                Log.Initialize();

                _LoadGraphEngineExtensions();
                _ScanForTSLStorageExtension();
                _ScanForMemoryCloudExtension();
                _ScanForStartupTasks();
                s_master_init_flag = true;
                BackgroundThread.Start();
            }
            try
            {
                Initialized();
            }
            catch
            {
                //TODO log
            }
        }