コード例 #1
0
        /// <summary>
        /// Retrieves a slot in the registration pool for a new worker.
        /// </summary>
        /// <param name="infoString">List of capabilities and features of new worker (not implemented).</param>
        /// <returns>Container with newly assigned name and private communication port number.</returns>
        private WorkerRegistration getNewWorkerRegistrationInformation(string infoString)
        {
            WorkerRegistration newRegistration;

            lock (registrationPool)
            {
                newRegistration = registrationPool.RegisterNewWorker();
            }
            sharedLogger.Msg("Manager", "Worker Registration Service", $"New worker registration '{newRegistration.Name}' on port {newRegistration.Port}");
            return(newRegistration);
        }