示例#1
0
        static void Main(string[] args)
        {
            while (true)
            {
                TimeSpan sleepTime = new TimeSpan(0, 0, 10);
                try
                {
                    var           program       = new Program();
                    ElasticSearch elasticSearch = new ElasticSearch();

                    elasticSearch.elasticSearch();

                    Console.WriteLine("Saving A Name In Memory");
                    program.SaveBigData();

                    Console.WriteLine("Reading Name from cache");
                    program.ReadData();

                    Thread.Sleep(sleepTime);
                }catch (Exception ex) {}
            }
        }
示例#2
0
    static void Main(string[] args)  
    {
        while (true)
        {
            TimeSpan sleepTime = new TimeSpan(0, 0, 10);
            try
            {
                var program = new Program();
                ElasticSearch elasticSearch = new ElasticSearch();

                elasticSearch.elasticSearch();

                Console.WriteLine("Saving A Name In Memory");
                program.SaveBigData();

                Console.WriteLine("Reading Name from cache");
                program.ReadData();

                Thread.Sleep(sleepTime);
               
            }catch(Exception ex){}
        }
    }