Exemplo n.º 1
0
        public static void Compute()
        {
            //tag::client-compute-setup[]
            var igniteCfg = new IgniteConfiguration
            {
                ClientConnectorConfiguration = new ClientConnectorConfiguration
                {
                    ThinClientConfiguration = new ThinClientConfiguration
                    {
                        MaxActiveComputeTasksPerConnection = 10
                    }
                }
            };

            IIgnite ignite = Ignition.Start(igniteCfg);
            //end::client-compute-setup[]

            var cfg = new IgniteClientConfiguration();
            //tag::client-compute-task[]
            IIgniteClient  client  = Ignition.StartClient(cfg);
            IComputeClient compute = client.GetCompute();
            int            result  = compute.ExecuteJavaTask <int>("org.foo.bar.AddOneTask", 1);
            //end::client-compute-task[]
        }