void StepThreePdx() { CacheHelper.DCache.TypeRegistry.RegisterPdxType(PdxTests.PdxTypes1.CreateDeserializable); CacheHelper.DCache.TypeRegistry.RegisterPdxType(PdxTests.PdxTypes8.CreateDeserializable); IRegion <object, object> region = CacheHelper.GetVerifyRegion <object, object>(m_regionNames[0]); region[1] = new PdxTests.PdxTypes8(); }
public void DoTxPuts() { CacheHelper.CSTXManager.Begin(); IRegion <object, object> reg = CacheHelper.GetVerifyRegion <object, object>(RegionName); reg[10000] = new PdxTests.PdxTypes8(); reg[100001] = "qqqqqqqqqqqqqq"; CacheHelper.CSTXManager.Commit(); }
public void PutOp(int key, Object CallbackArg) { Object value = "value"; for (int i = 1; i <= key; i++) { Util.Log("PutOp:key={0},value={1}", i, value); m_region.Put(i, value, CallbackArg); //m_region[10000 + i] = new PdxTests.PdxTypes1(); m_region[10000 + i] = new PdxTests.PdxTypes8(); } }
public void DoPutsTx(int numOps, bool useNewVal, ExpectedResult expect, Client.Properties <string, string> credentials, bool multiuserMode) { Util.Log("DoPutsTx starts"); CacheHelper.CSTXManager.Begin(); string valPrefix = (useNewVal ? NValuePrefix : ValuePrefix); IRegion <object, object> region; if (multiuserMode) { region = CacheHelper.GetVerifyRegion <object, object>(RegionName, credentials); } else { region = CacheHelper.GetVerifyRegion <object, object>(RegionName); } CacheHelper.DCache.TypeRegistry.RegisterPdxType(PdxTests.PdxTypes1.CreateDeserializable); CacheHelper.DCache.TypeRegistry.RegisterPdxType(PdxTests.PdxTypes8.CreateDeserializable); for (int opNum = 1; opNum <= numOps; ++opNum) { try { region[KeyPrefix + opNum] = valPrefix + opNum; region.Invalidate(KeyPrefix + opNum); region[KeyPrefix + opNum] = valPrefix + opNum; Util.Log("Pdx ops starts"); region[opNum] = new PdxTests.PdxTypes8(); region[opNum + "_pdx1"] = new PdxTests.PdxTypes1(); region[opNum + "_pdx_8"] = new PdxTests.PdxTypes8(); IDictionary <object, object> putall = new Dictionary <object, object>(); putall.Add(opNum + "_pdxputall81", new PdxTests.PdxTypes8()); putall.Add(opNum + "_pdxputall82", new PdxTests.PdxTypes8()); region.PutAll(putall); Util.Log("Pdx ops ends"); if (expect != ExpectedResult.Success) { Assert.Fail("DoPuts: Expected an exception in put"); } } catch (AssertionException) { throw; } catch (NotAuthorizedException ex) { if (expect == ExpectedResult.NotAuthorizedException) { Util.Log("DoPuts: got expected unauthorized exception: " + ex.GetType() + "::" + ex.Message); } else { Assert.Fail("DoPuts: unexpected exception caught: " + ex); } } catch (AuthenticationFailedException ex) { if (expect == ExpectedResult.AuthFailedException) { Util.Log("DoPuts: got expected authentication Failed exception: " + ex.GetType() + "::" + ex.Message); } else { Assert.Fail("DoPuts: unexpected exception caught: " + ex); } } catch (Exception ex) { if (expect == ExpectedResult.OtherException) { Util.Log("DoPuts: got expected exception: " + ex.GetType() + "::" + ex.Message); } else { Assert.Fail("DoPuts: unexpected exception caught: " + ex); } } } CacheHelper.CSTXManager.Commit(); Util.Log("DoPutsTx Done"); }