protected TCObjectImpl(final ObjectID id, final Object peer, final TCClass clazz, final boolean isNew) { this.objectID = id; this.tcClazz = clazz; if (peer != null) { setPeerObject(getObjectManager().newWeakObjectReference(id, peer)); } setFlag(IS_NEW_OFFSET, isNew); }
protected TCObjectImpl(final ObjectID id, final Object peer, final TCClass clazz, final boolean isNew) { this.objectID = id; this.tcClazz = clazz; if (peer != null) { setPeerObject(getObjectManager().newWeakObjectReference(id, peer)); } setFlag(IS_NEW_OFFSET, isNew); }
protected TCObjectImpl(final ObjectID id, final Object peer, final TCClass clazz, final boolean isNew) { this.objectID = id; this.tcClazz = clazz; if (peer != null) { setPeerObject(getObjectManager().newWeakObjectReference(id, peer)); } setFlag(IS_NEW_OFFSET, isNew); }
/** * Reconstitutes the object using the data in the DNA strand. XXX: We may need to signal (via a different signature or * args) that the hydration is intended to initialize the object from scratch or if it's a delta. We must avoid * creating a new instance of the peer object if the strand is just a delta.<br> * <p> * TODO:: Split into two interface, peer is null if not new. * * @throws ClassNotFoundException */ @Override public void hydrate(final DNA from, final boolean force, final WeakReference peer) throws ClassNotFoundException { synchronized (getResolveLock()) { if (peer != null) { setPeerObject(peer); } final Object po = getPeerObject(); if (po == null) { return; } try { getTCClass().hydrate(this, from, po, force); } catch (final IOException ioe) { LOGGER.warn(ioe); throw new DNAException(ioe); } } }
/** * Reconstitutes the object using the data in the DNA strand. XXX: We may need to signal (via a different signature or * args) that the hydration is intended to initialize the object from scratch or if it's a delta. We must avoid * creating a new instance of the peer object if the strand is just a delta.<br> * <p> * TODO:: Split into two interface, peer is null if not new. * * @throws ClassNotFoundException */ @Override public void hydrate(final DNA from, final boolean force, final WeakReference peer) throws ClassNotFoundException { synchronized (getResolveLock()) { if (peer != null) { setPeerObject(peer); } final Object po = getPeerObject(); if (po == null) { return; } try { this.tcClazz.hydrate(this, from, po, force); } catch (final ClassNotFoundException e) { logger.warn("Re-throwing Exception: ", e); throw e; } catch (final IOException e) { logger.warn("Re-throwing Exception: ", e); throw new DNAException(e); } } }
/** * Reconstitutes the object using the data in the DNA strand. XXX: We may need to signal (via a different signature or * args) that the hydration is intended to initialize the object from scratch or if it's a delta. We must avoid * creating a new instance of the peer object if the strand is just a delta.<br> * <p> * TODO:: Split into two interface, peer is null if not new. * * @throws ClassNotFoundException */ @Override public void hydrate(final DNA from, final boolean force, final WeakReference peer) throws ClassNotFoundException { synchronized (getResolveLock()) { if (peer != null) { setPeerObject(peer); } final Object po = getPeerObject(); if (po == null) { return; } try { this.tcClazz.hydrate(this, from, po, force); } catch (final ClassNotFoundException e) { logger.warn("Re-throwing Exception: ", e); throw e; } catch (final IOException e) { logger.warn("Re-throwing Exception: ", e); throw new DNAException(e); } } }