Exemplo n.º 1
0
        private static void NewMetadataLocationToProcesses(string id, string location)
        {
            List <Thread> requests = new List <Thread>();

            foreach (var entry in processes)
            {
                IProcessToPM process = entry.Value;
                if (id.First() == 'm')
                {
                    process.MetadataLocation(id, location);
                }
                else
                {
                    Thread request = new Thread(() => process.MetadataLocation(id, location));
                    requests.Add(request);
                }
            }

            // sends to all non-metadata the new metadata in broadcast
            foreach (Thread request in requests)
            {
                request.Start();
            }
            foreach (Thread request in requests)
            {
                request.Join();
            }
        }
Exemplo n.º 2
0
        private static void SendMetadataLocations(IProcessToPM process)
        {
            foreach (var entry in metadataLocations)
            {
                string id       = entry.Key;
                string location = entry.Value;

                process.MetadataLocation(id, location);
            }
        }
Exemplo n.º 3
0
        private static void SendMetadataLocations(IProcessToPM process)
        {
            foreach (var entry in metadataLocations)
            {
                string id = entry.Key;
                string location = entry.Value;

                process.MetadataLocation(id, location);
            }
        }
Exemplo n.º 4
0
        public static void DumpProcess(string id)
        {
            IProcessToPM process = (IProcessToPM)GetProcess(id);

            process.Dump();
        }