public void TestIndexing([Values(true, false)] bool client)
        {
            var grid = client ? _clientGrid : _grid;

            var cache = grid.GetCache <int, PlatformComputeBinarizable>("default");

            // Populate cache in .NET
            for (var i = 0; i < 100; i++)
            {
                cache[i] = new PlatformComputeBinarizable {
                    Field = i
                }
            }
            ;

            // Run SQL query on Java side
            var qryRes = grid.GetCompute().ExecuteJavaTask <IList>(PlatformSqlQueryTask, "Field < 10");

            Assert.AreEqual(10, qryRes.Count);
            Assert.IsTrue(qryRes.OfType <PlatformComputeBinarizable>().All(x => x.Field < 10));
        }
        public void TestIndexing([Values(true, false)] bool client)
        {
            var grid = client ? _clientGrid : _grid;

            var cache = grid.GetCache<int, PlatformComputeBinarizable>(null);

            // Populate cache in .NET
            for (var i = 0; i < 100; i++)
                cache[i] = new PlatformComputeBinarizable {Field = i};

            // Run SQL query on Java side
            var qryRes = grid.GetCompute().ExecuteJavaTask<IList>(PlatformSqlQueryTask, "Field < 10");

            Assert.AreEqual(10, qryRes.Count);
            Assert.IsTrue(qryRes.OfType<PlatformComputeBinarizable>().All(x => x.Field < 10));
        }
Пример #3
0
 /** <inheritDoc /> */
 public PlatformComputeBinarizable testBinarizable(PlatformComputeBinarizable x)
 {
     return(x == null ? null : new PlatformComputeBinarizable {
         Field = x.Field + 1
     });
 }
Пример #4
0
 /** <inheritDoc /> */
 public PlatformComputeBinarizable testBinarizable(PlatformComputeBinarizable x)
 {
     return(_svc.testBinarizable(x));
 }