Esempio n. 1
0
        static void Main(string[] args)
        {
            var cluster = new LockClusterManager();

            cluster.StartControlNodes(3).ConfigureAwait(false).GetAwaiter().GetResult();

            // while (true)
            {
                Console.ReadLine();
            }



            while (true)
            {
                Console.WriteLine("before lock operation,press enter");
                Console.ReadLine();

                LockOper op = new LockOper()
                {
                    Key     = "key",
                    Oper    = "lock",
                    Session = "session1"
                };
                cluster.BeginRequest(op);
            }
            Console.ReadLine();
        }
Esempio n. 2
0
        static async Task RunServerAsync()
        {
            Console.WriteLine(
                $"\n{RuntimeInformation.OSArchitecture} {RuntimeInformation.OSDescription}"
                + $"\n{RuntimeInformation.ProcessArchitecture} {RuntimeInformation.FrameworkDescription}"
                + $"\nProcessor Count : {Environment.ProcessorCount}\n");

            LockClusterManager manager = new LockClusterManager();
            await manager.StartControlNodes(3);
        }