boolean serialized; SerializedCacheValue<?> serValue = event.getSerializedNewValue(); serialized = (serValue != null); if (!serialized) {
boolean serialized; SerializedCacheValue<?> serValue = event.getSerializedNewValue(); serialized = (serValue != null); if (!serialized) {
public void afterCreate(EntryEvent event) { getLogWriter().info("Invoking afterCreate on listener; name=" + event.getKey()); assertEquals(event.getCallbackArgument(), event.getDistributedMember()); assertEquals(Operation.CREATE, event.getOperation()); Assert.assertTrue(event.getOldValue() == null); getBlackboard().incNumInvocations1(); assertEquals("newValue is wrong", new Integer(0), event.getNewValue()); assertNull("oldValue not null", event.getOldValue()); if (event.getSerializedOldValue() != null) { assertEquals(event.getOldValue(), event.getSerializedOldValue().getDeserializedValue()); } if (event.getSerializedNewValue() != null) { assertEquals(event.getNewValue(), event.getSerializedNewValue().getDeserializedValue()); } getLogWriter().info("create event new value is: " + event.getNewValue()); }
public void afterUpdate(EntryEvent event) { getLogWriter().info("Invoking afterUpdate on listener; name=" + event.getKey()); assertEquals(event.getCallbackArgument(), event.getDistributedMember()); assertEquals(Operation.UPDATE, event.getOperation()); Assert.assertTrue(event.getOldValue() != null); if (event.getSerializedOldValue() != null) { assertEquals(event.getOldValue(), event.getSerializedOldValue().getDeserializedValue()); } if (event.getSerializedNewValue() != null) { assertEquals(event.getNewValue(), event.getSerializedNewValue().getDeserializedValue()); } newValue = event.getNewValue(); oldValue = event.getOldValue(); getBlackboard().incNumInvocations2(); getLogWriter().info("update event new value is: " + newValue ); getLogWriter().info("update event old value is: " + oldValue ); } };