public void TestDeployKeyAffinitySingletonBinarizable() { var services = Services.WithKeepBinary(); var svc = new TestIgniteServiceBinarizable(); var affKey = new BinarizableObject { Val = AffKey }; services.DeployKeyAffinitySingleton(SvcName, svc, CacheName, affKey); var prx = services.GetServiceProxy <ITestIgniteService>(SvcName); Assert.IsTrue(prx.Initialized); }
public void TestWithKeepBinaryBoth() { var svc = new TestIgniteServiceBinarizable(); // Deploy to grid2 Grid1.GetCluster().ForNodeIds(Grid2.GetCluster().GetLocalNode().Id).GetServices().WithKeepBinary().WithServerKeepBinary() .DeployNodeSingleton(SvcName, svc); // Get proxy var prx = Services.WithKeepBinary().WithServerKeepBinary().GetServiceProxy <ITestIgniteService>(SvcName); var obj = new BinarizableObject { Val = 11 }; var res = (IBinaryObject)prx.Method(obj); Assert.AreEqual(11, res.Deserialize <BinarizableObject>().Val); res = (IBinaryObject)prx.Method(Grid1.GetBinary().ToBinary <IBinaryObject>(obj)); Assert.AreEqual(11, res.Deserialize <BinarizableObject>().Val); }
public void TestWithKeepBinaryBoth() { var svc = new TestIgniteServiceBinarizable(); // Deploy to grid2 Grid1.GetCluster().ForNodeIds(Grid2.GetCluster().GetLocalNode().Id).GetServices().WithKeepBinary().WithServerKeepBinary() .DeployNodeSingleton(SvcName, svc); // Get proxy var prx = Services.WithKeepBinary().WithServerKeepBinary().GetServiceProxy<ITestIgniteService>(SvcName); var obj = new BinarizableObject { Val = 11 }; var res = (IBinaryObject)prx.Method(obj); Assert.AreEqual(11, res.Deserialize<BinarizableObject>().Val); res = (IBinaryObject)prx.Method(Grid1.GetBinary().ToBinary<IBinaryObject>(obj)); Assert.AreEqual(11, res.Deserialize<BinarizableObject>().Val); }
public void TestDeployKeyAffinitySingletonBinarizable() { var services = Services.WithKeepBinary(); var svc = new TestIgniteServiceBinarizable(); var affKey = new BinarizableObject {Val = AffKey}; services.DeployKeyAffinitySingleton(SvcName, svc, CacheName, affKey); var prx = services.GetServiceProxy<ITestIgniteService>(SvcName); Assert.IsTrue(prx.Initialized); }