public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); assertEquals(new SimpleClass(57, (byte) 3), r.get(1)); return null; } };
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); assertEquals(new SimpleClass(57, (byte) 3), r.get(1)); return null; } };
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); try { r.put(1, new SimpleClass(57, (byte) 3)); fail("should have received an exception"); } catch(PdxInitializationException expected) { //do nothing } return null; } };
public Object call() throws Exception { Region r = getRootRegion("region1"); assertEquals(new SimpleClass(57, (byte) 3), r.get(1)); return null; } });
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); byte[] bytes = (byte[]) r.get(1); DataInputStream bis = new DataInputStream(new ByteArrayInputStream(bytes)); Object result = DataSerializer.readObject(bis); assertEquals(new SimpleClass(57, (byte) 3), result); return null; } };
private void defineAType() throws IOException { SimpleClass sc = new SimpleClass(1, (byte) 2); HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT); DataSerializer.writeObject(sc, out); } private void defineATypeNoEnum() throws IOException {
private void defineATypeNoEnum() throws IOException { SimpleClass sc = new SimpleClass(1, (byte) 2, null); HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT); DataSerializer.writeObject(sc, out); }
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); r.put(1, new SimpleClass(57, (byte) 3)); return null; } });
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); r.put(1, new SimpleClass(57, (byte) 3)); return null; } });
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); r.put(1, new SimpleClass(57, (byte) 3)); return null; } });
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); assertEquals(new SimpleClass(57, (byte) 3), r.get(1)); assertEquals(new SimpleClass2(57, (byte) 3), r.get(2)); return null; } };
public Object call() throws Exception { HeapDataOutputStream bytes = new HeapDataOutputStream(Version.CURRENT); Region r1 = getRootRegion("region1"); r1.put(1, new SimpleClass(57, (byte) 3)); Region r2 = getRootRegion("region2"); r2.put(1, new SimpleClass(57, (byte) 3)); return null; } });
public Object call() throws Exception { //Make sure the cache exists getCache(); DataSerializer.writeObject(new SimpleClass(value, (byte) value), new HeapDataOutputStream(Version.CURRENT)); return null; } };
public Object call() throws Exception { //Make sure the cache exists getCache(); DataSerializer.writeObject(new SimpleClass(value, (byte) value, enumVal), new HeapDataOutputStream(Version.CURRENT)); return null; } };
public Object call() throws Exception { Cache cache = getCache(); Region region1 = cache.getRegion("region"); region1.put(key, new SimpleClass(value, (byte) value)); return null; } };
public Object call() throws Exception { Region r = getRootRegion("testSimplePdx"); assertEquals(new SimpleClass(57, (byte) 3), r.get(1)); //Ok, now the type registry should exist assertNotNull(getRootRegion(PeerTypeRegistration.REGION_NAME)); return null; } };
public Object call() throws Exception { //Ok, now the type registry should exist assertNotNull(getRootRegion(PeerTypeRegistration.REGION_NAME)); Region r = getRootRegion("testSimplePdx"); assertEquals(new SimpleClass(57, (byte) 3), r.get(1)); return null; } });
public static void doPutsPDXSerializable(String regionName, int numPuts) { Region r = cache.getRegion(Region.SEPARATOR + regionName); assertNotNull(r); for (int i = 0; i < numPuts; i++) { r.put("Key_" + i, new SimpleClass(i, (byte)i)); } }
public Object call() throws Exception { Cache cache = getCache(); final Region region1 = cache.getRegion("region"); waitForCriterion(new WaitCriterion() { public String description() { return "Didn't receive update over the WAN"; } public boolean done() { return region1.get(key) != null; } }, 30000, 100, true); assertEquals(new SimpleClass(value, (byte) value), region1.get(key)); return null; }
public void testByteFormatForSimpleClass() throws Exception { HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT); PdxSerializable object = new SimpleClass(1, (byte)5, null); DataSerializer.writeObject(object, out); int typeId = getLastPdxTypeId();