@Override public void hydrate(final TCObject tcObject, final DNA dna, final Object pojo, final boolean force) throws IOException, ClassNotFoundException { // Okay...long story here The application of the DNA used to be a synchronized(applicator) block. As best as Steve // and I could tell, the synchronization was solely a memory boundary and not a mutual exlusion mechanism. For the // time being, we have resolved that we need no synchronization here (either for memory, or exclusion). The memory // barrier aspect isn't known to be a problem and the concurrency is handled by the server (ie. we won't get // concurrent updates). At some point it would be a good idea to detect (and error out) when updates are received // from L2 but local read/writes have been made on the target TCObject final long localVersion = tcObject.getVersion(); final long dnaVersion = dna.getVersion(); if (force || (localVersion < dnaVersion)) { tcObject.setVersion(dnaVersion); this.applicator.hydrate(this.objectManager, tcObject, dna, pojo); } else if (logger.isDebugEnabled()) { logger .debug("IGNORING UPDATE, local object at version " + localVersion + ", dna update is version " + dnaVersion); } }
@Override public void hydrate(final TCObject tcObject, final DNA dna, final Object pojo, final boolean force) throws IOException, ClassNotFoundException { // Okay...long story here The application of the DNA used to be a synchronized(applicator) block. As best as Steve // and I could tell, the synchronization was solely a memory boundary and not a mutual exlusion mechanism. For the // time being, we have resolved that we need no synchronization here (either for memory, or exclusion). The memory // barrier aspect isn't known to be a problem and the concurrency is handled by the server (ie. we won't get // concurrent updates). At some point it would be a good idea to detect (and error out) when updates are received // from L2 but local read/writes have been made on the target TCObject final long localVersion = tcObject.getVersion(); final long dnaVersion = dna.getVersion(); if (force || (localVersion < dnaVersion)) { tcObject.setVersion(dnaVersion); this.applicator.hydrate(this.objectManager, tcObject, dna, pojo); } else if (logger.isDebugEnabled()) { logger .debug("IGNORING UPDATE, local object at version " + localVersion + ", dna update is version " + dnaVersion); } }
@Override public void hydrate(final TCObject tcObject, final DNA dna, final Object pojo, final boolean force) throws IOException, ClassNotFoundException { // Okay...long story here The application of the DNA used to be a synchronized(applicator) block. As best as Steve // and I could tell, the synchronization was solely a memory boundary and not a mutual exlusion mechanism. For the // time being, we have resolved that we need no synchronization here (either for memory, or exclusion). The memory // barrier aspect isn't known to be a problem and the concurrency is handled by the server (ie. we won't get // concurrent updates). At some point it would be a good idea to detect (and error out) when updates are received // from L2 but local read/writes have been made on the target TCObject final long localVersion = tcObject.getVersion(); final long dnaVersion = dna.getVersion(); if (force || (localVersion < dnaVersion)) { tcObject.setVersion(dnaVersion); this.applicator.hydrate(this.objectManager, tcObject, dna, pojo); } else if (logger.isDebugEnabled()) { logger .debug("IGNORING UPDATE, local object at version " + localVersion + ", dna update is version " + dnaVersion); } }
final boolean isUninitialized = isUninitialized(); final long dna_version = dna.getVersion(); if (dna_version <= this.version) { if (ignoreIfOlderDNA) {
long version = orgDNA.getVersion(); if (version == DNA.NULL_VERSION) { Assert.assertFalse(gtxID.isNull());