private ObjectID shareObject(Object param) { boolean isLiteral = LiteralValues.isLiteralInstance(param); if (!isLiteral) { TCObject object = this.objectManager.lookupOrCreate(param, this.groupID); return object.getObjectID(); } return ObjectID.NULL_ID; }
@Override public TCObject createTCObject(final ObjectID id, final Object pojo, final boolean isNew) { if (pojo instanceof TCObjectSelf) { TCObjectSelf self = (TCObjectSelf) pojo; self.initializeTCObject(id, this, isNew); return self; } else if (this.isLogical) { return new TCObjectLogical(id, pojo, this, isNew); } else { return new TCObjectPhysical(id, pojo, this, isNew); } }
public synchronized void replaceRootIDIfNecessary(final String rootName, final GroupID gid, final ObjectID newRootID) { waitUntilRunning(); final ObjectID oldRootID = this.rootsHolder.getRootIDForName(rootName, gid); if (oldRootID == null || oldRootID.equals(newRootID)) { return; } this.rootsHolder.addRoot(rootName, newRootID); }
private void updateLocalCacheIfNecessary(final Object key, final Object value) { // Null values (i.e. cache misses) & literal values are not cached locally if (value != null && !LiteralValues.isLiteralInstance(value)) { if (isEventual) { // addEventualValueToCache(key, value, this.objectManager.lookupExistingObjectID(value), MapOperationType.GET); } else { addIncoherentValueToCache(key, value, this.objectManager.lookupExistingObjectID(value), MapOperationType.GET); } } }
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); }
@Override public DNA retrieve(final ObjectID id, final int depth) throws AbortedOperationException { final GroupID gid = getGroupID(id); return getRemoteObjectManager(gid).retrieve(id, depth); }
@Override public boolean isInDNACache(final ObjectID id) { final GroupID gid = getGroupID(id); return getRemoteObjectManager(gid).isInDNACache(id); }
@Override public TraversedReferences getPortableObjects(final Class clazz, final Object start, final TraversedReferences addTo) { final TCClass tcc = this.clazzFactory.getOrCreate(clazz, this); return tcc.getPortableObjects(start, addTo); }
@Override protected synchronized Set addAllObjectIDs(Set oids, final NodeID remoteNode) { oids = super.addAllObjectIDs(oids, remoteNode); this.objectLookupTable.retainObjectsFrom(remoteNode, oids); return oids; } }
@Override public void dispatch(final ServerEvent event, final NodeID remoteNode) { final GroupID groupId = (GroupID) remoteNode; getManagerForGroup(groupId).dispatch(event, remoteNode); }
@Override public void objectsNotFoundFor(final SessionID sessionID, final long batchID, final Set missingObjectIDs, final NodeID nodeID) { getRemoteObjectManager((GroupID) nodeID).objectsNotFoundFor(sessionID, batchID, missingObjectIDs, nodeID); }
@Override public void initializeHandshake(final NodeID thisNode, final NodeID remoteNode, final ClientHandshakeMessage handshakeMessage) { final GroupID groupId = (GroupID) remoteNode; getManagerForGroup(groupId).initializeHandshake(thisNode, remoteNode, handshakeMessage); }
private ObjectID shareObject(Object param) { boolean isLiteral = LiteralValues.isLiteralInstance(param); if (!isLiteral) { TCObject object = this.objectManager.lookupOrCreate(param, this.groupID); return object.getObjectID(); } return ObjectID.NULL_ID; }
public synchronized void replaceRootIDIfNecessary(final String rootName, final GroupID gid, final ObjectID newRootID) { waitUntilRunning(); final ObjectID oldRootID = this.rootsHolder.getRootIDForName(rootName, gid); if (oldRootID == null || oldRootID.equals(newRootID)) { return; } this.rootsHolder.addRoot(rootName, newRootID); }
private void updateLocalCacheIfNecessary(final Object key, final Object value) { // Null values (i.e. cache misses) & literal values are not cached locally if (value != null && !LiteralValues.isLiteralInstance(value)) { if (isEventual) { // addEventualValueToCache(key, value, this.objectManager.lookupExistingObjectID(value), MapOperationType.GET); } else { addIncoherentValueToCache(key, value, this.objectManager.lookupExistingObjectID(value), MapOperationType.GET); } } }
@Override public TCObject createTCObject(final ObjectID id, final Object pojo, final boolean isNew) { if (pojo instanceof TCObjectSelf) { TCObjectSelf self = (TCObjectSelf) pojo; self.initializeTCObject(id, this, isNew); return self; } else if (this.isLogical) { return new TCObjectLogical(id, pojo, this, isNew); } else { return new TCObjectPhysical(id, pojo, this, isNew); } }
@Override public boolean isInDNACache(final ObjectID id) { final GroupID gid = getGroupID(id); return getRemoteObjectManager(gid).isInDNACache(id); }
private ObjectID shareObject(Object param) { boolean isLiteral = LiteralValues.isLiteralInstance(param); if (!isLiteral) { TCObject object = this.objectManager.lookupOrCreate(param, this.groupID); return object.getObjectID(); } return ObjectID.NULL_ID; }
public synchronized void replaceRootIDIfNecessary(final String rootName, final GroupID gid, final ObjectID newRootID) { waitUntilRunning(); final ObjectID oldRootID = this.rootsHolder.getRootIDForName(rootName, gid); if (oldRootID == null || oldRootID.equals(newRootID)) { return; } this.rootsHolder.addRoot(rootName, newRootID); }
private void updateLocalCacheIfNecessary(final Object key, final Object value) { // Null values (i.e. cache misses) & literal values are not cached locally if (value != null && !LiteralValues.isLiteralInstance(value)) { if (isEventual) { // addEventualValueToCache(key, value, this.objectManager.lookupExistingObjectID(value), MapOperationType.GET); } else { addIncoherentValueToCache(key, value, this.objectManager.lookupExistingObjectID(value), MapOperationType.GET); } } }