@Override public boolean isDelta() { return dna.isDelta(); }
@Override public boolean isDelta() { return dna.isDelta(); }
DNA dna = (DNA) j.next(); ObjectID id = dna.getObjectID(); if (!dna.isDelta()) {
final DNA dna = (DNA) i.next(); TCObject tcobj = null; Assert.assertTrue(dna.isDelta());
final DNA dna = (DNA) i.next(); TCObject tcobj = null; Assert.assertTrue(dna.isDelta());
final DNA dna = (DNA) i.next(); TCObject tcobj = null; Assert.assertTrue(dna.isDelta());
final DNA dna = (DNA) i.next(); added &= ids.add(dna.getObjectID()); if (!dna.isDelta()) { newIDs.add(dna.getObjectID());
final ObjectID oid = dna.getObjectID(); if (clientState.containsReference(oid)) { if (dna.isDelta() && !applyInfo.isBroadcastIgnoredFor(oid)) { prunedChanges.add(dna); } else {
@Override public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tcObjectExternal, final DNA dna, final Object pojo) throws ClassNotFoundException, IOException { final DNACursor cursor = dna.getCursor(); if (!dna.isDelta()) { // Shouldn't have anything to hydrate if (cursor.next(this.encoding)) { throw new AssertionError("CDSM shouldn't fault in entry mappings : DNA " + dna); } return; } boolean clearFound = false; // Transactions could be folded, hence ignoring other changes. while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); if (method == SerializationUtil.CLEAR || method == SerializationUtil.CLEAR_LOCAL_CACHE) { ((TCObjectServerMap) tcObjectExternal).clearLocalCache((TCServerMap) pojo); clearFound = true; } else { getLogger().warn("CDSM received delta changes for methods other than CLEAR : " + method); } } if (!clearFound) { // Can't assert here as resent transactions on server crash can be broadcasted as it might skip apply at the // server. getLogger() .warn("CDSM shouldn't normally be broadcasting changes unless its a clear, but could be a resent txn after crash : DNA " + dna); } }
@Override public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tcObjectExternal, final DNA dna, final Object pojo) throws ClassNotFoundException, IOException { final DNACursor cursor = dna.getCursor(); if (!dna.isDelta()) { // Shouldn't have anything to hydrate if (cursor.next(this.encoding)) { throw new AssertionError("CDSM shouldn't fault in entry mappings : DNA " + dna); } return; } boolean clearFound = false; // Transactions could be folded, hence ignoring other changes. while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); if (method == SerializationUtil.CLEAR || method == SerializationUtil.CLEAR_LOCAL_CACHE) { ((TCObjectServerMap) tcObjectExternal).clearLocalCache((TCServerMap) pojo); clearFound = true; } else { getLogger().warn("CDSM received delta changes for methods other than CLEAR : " + method); } } if (!clearFound) { // Can't assert here as resent transactions on server crash can be broadcasted as it might skip apply at the // server. getLogger() .warn("CDSM shouldn't normally be broadcasting changes unless its a clear, but could be a resent txn after crash : DNA " + dna); } }
private TCObject createObjectWithDNA(DNA dna) throws ClassNotFoundException { TCObject obj = null; Class clazz = this.classProvider.getClassFor(dna.getTypeName()); TCClass tcClazz = clazzFactory.getOrCreate(clazz, this); Object pojo = createNewPojoObject(tcClazz, dna); obj = this.factory.getNewInstance(dna.getObjectID(), pojo, clazz, false); Assert.assertFalse(dna.isDelta()); // now hydrate the object, this could call resolveReferences which would call this method recursively if (obj instanceof TCObjectSelf) { obj.hydrate(dna, false, null); } else { obj.hydrate(dna, false, newWeakObjectReference(dna.getObjectID(), pojo)); } basicAddLocal(obj); return obj; }
private TCObject createObjectWithDNA(DNA dna) throws ClassNotFoundException { TCObject obj = null; Class clazz = this.classProvider.getClassFor(Namespace.parseClassNameIfNecessary(dna.getTypeName())); TCClass tcClazz = clazzFactory.getOrCreate(clazz, this); Object pojo = createNewPojoObject(tcClazz, dna); obj = this.factory.getNewInstance(dna.getObjectID(), pojo, clazz, false); Assert.assertFalse(dna.isDelta()); // now hydrate the object, this could call resolveReferences which would call this method recursively if (obj instanceof TCObjectSelf) { obj.hydrate(dna, false, null); } else { obj.hydrate(dna, false, newWeakObjectReference(dna.getObjectID(), pojo)); } basicAddLocal(obj); return obj; }
private TCObject createObjectWithDNA(DNA dna) throws ClassNotFoundException { TCObject obj = null; Class clazz = this.classProvider.getClassFor(Namespace.parseClassNameIfNecessary(dna.getTypeName())); TCClass tcClazz = clazzFactory.getOrCreate(clazz, this); Object pojo = createNewPojoObject(tcClazz, dna); obj = this.factory.getNewInstance(dna.getObjectID(), pojo, clazz, false); Assert.assertFalse(dna.isDelta()); // now hydrate the object, this could call resolveReferences which would call this method recursively if (obj instanceof TCObjectSelf) { obj.hydrate(dna, false, null); } else { obj.hydrate(dna, false, newWeakObjectReference(dna.getObjectID(), pojo)); } basicAddLocal(obj); return obj; }
if (!dna.isDelta()) { Assert.assertTrue(hasPhysicalAction); ensureRetrievedFields(po);
if (!dna.isDelta()) { Assert.assertTrue(hasPhysicalAction); ensureRetrievedFields(po);
dnaImpl.setTypeClassName(mo.getManagedObjectState().getClassName()); if (active && !change.isDelta() && isClient) {
if (!dna.isDelta()) { Assert.assertTrue(hasPhysicalAction); ensureRetrievedFields(po);