public ObjectLookupState(final TCObject set) { this.objectID = set.getObjectID(); this.object = set; this.isSet = true; this.owner = null; this.session = currentSession; }
public ObjectLookupState(final TCObject set) { this.objectID = set.getObjectID(); this.object = set; this.isSet = true; this.owner = null; this.session = currentSession; }
public void add(final TCObject obj) { // Ignoring this currently as this is expected to be added in tc object self store if (obj instanceof TCObjectSelf) { this.tcObjectSelfStore.addTCObjectSelfTemp((TCObjectSelf) obj); return; } this.objectStoreMap.put(obj.getObjectID(), obj); }
public void remove(final TCObject tcobj) { if (tcobj instanceof TCObjectSelf) { throw new AssertionError( "TCObjectSelf should not have called removed from here: " + tcobj); } if (tcobj.isCacheManaged()) { this.cache.remove(tcobj); } else { this.cacheUnmanaged.remove(tcobj.getObjectID()); } }
@Override public ObjectID lookupExistingObjectID(final Object pojo) { if (LiteralValues.isLiteralInstance(pojo)) { return ObjectID.NULL_ID; } if (pojo instanceof TCObjectSelf) { return ((TCObjectSelf) pojo).getObjectID(); } final TCObject obj = basicLookup(pojo); if (obj == null) { throw new AssertionError("Missing object ID for: Object of class " + pojo.getClass().getName() + " [Identity Hashcode : 0x" + Integer.toHexString(System.identityHashCode(pojo)) + "] "); } return obj.getObjectID(); }
@Override public ObjectID lookupExistingObjectID(final Object pojo) { if (LiteralValues.isLiteralInstance(pojo)) { return ObjectID.NULL_ID; } if (pojo instanceof TCObjectSelf) { return ((TCObjectSelf) pojo).getObjectID(); } final TCObject obj = basicLookup(pojo); if (obj == null) { throw new AssertionError("Missing object ID for: Object of class " + pojo.getClass().getName() + " [Identity Hashcode : 0x" + Integer.toHexString(System.identityHashCode(pojo)) + "] "); } return obj.getObjectID(); }
public Map<K, V> unlockedGetAll(final Set<K> keys) { final Map<ObjectID, Set<K>> mapIdToKeysMap = new HashMap<ObjectID, Set<K>>(); TCObject tcobject = this.__tc_managed(); if (tcobject == null) { throw new UnsupportedOperationException( "unlockedGetAll is not supported in a non-shared ServerMap"); } ObjectID mapId = tcobject.getObjectID(); mapIdToKeysMap.put(mapId, keys); return ((TCObjectServerMap) __tc_managed()).getAllValuesUnlocked(mapIdToKeysMap); }
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; }
private TCChangeBuffer getOrCreateChangeBuffer(TCObject object) { addReferenced(object.getPeerObject()); ObjectID oid = object.getObjectID(); TCChangeBuffer cb = objectChanges.get(oid); if (cb == null) { cb = new TCChangeBufferImpl(object); objectChanges.put(oid, cb); } return cb; }
private TCChangeBuffer getOrCreateChangeBuffer(TCObject object) { addReferenced(object.getPeerObject()); ObjectID oid = object.getObjectID(); TCChangeBuffer cb = objectChanges.get(oid); if (cb == null) { cb = new TCChangeBufferImpl(object); objectChanges.put(oid, cb); } return cb; }
private String getInstanceDsoLockName() { if (this.instanceDsoLockName != null) { return this.instanceDsoLockName; } // The trailing colon (':') is relevant to avoid unintended lock collision when appending object ID to the key // Without the delimiter you'd get the same effective lock for oid 11, lockId 10 and oid 1 and lockId 110 this.instanceDsoLockName = "@" + "CDM" + ((Manageable) this).__tc_managed().getObjectID().toLong() + ":"; return this.instanceDsoLockName; }
@Override public <K> Map<K, Set<NodeID>> getNodesWithKeys(final TCServerMap tcMap, final Collection<? extends K> keys) { waitUntilRunning(); final ObjectID mapObjectID = tcMap.__tc_managed().getObjectID(); return getNodesWithKeys(keys, mapObjectID); }
@Override public void addMetaDataDescriptor(final TCObject tco, final MetaDataDescriptorInternal md) { md.setObjectID(tco.getObjectID()); getTransaction().addMetaDataDescriptor(tco, md); }
@Override public void addMetaDataDescriptor(final TCObject tco, final MetaDataDescriptorInternal md) { md.setObjectID(tco.getObjectID()); getTransaction().addMetaDataDescriptor(tco, md); }
@Override public <K> Map<K, Set<NodeID>> getNodesWithKeys(final TCMap tcMap, final Collection<? extends K> keys) { waitUntilRunning(); final ObjectID mapObjectID = ((Manageable) tcMap).__tc_managed().getObjectID(); return getNodesWithKeys(keys, mapObjectID); }
@Override public <K> Map<K, Set<NodeID>> getNodesWithKeys(final TCServerMap tcMap, final Collection<? extends K> keys) { waitUntilRunning(); final ObjectID mapObjectID = tcMap.__tc_managed().getObjectID(); return getNodesWithKeys(keys, mapObjectID); }
@Override public void addMetaDataDescriptor(final TCObject tco, final MetaDataDescriptorInternal md) { md.setObjectID(tco.getObjectID()); getTransaction().addMetaDataDescriptor(tco, md); }
@Override public <K> Map<K, Set<NodeID>> getNodesWithKeys(final TCMap tcMap, final Collection<? extends K> keys) { waitUntilRunning(); final ObjectID mapObjectID = ((Manageable) tcMap).__tc_managed().getObjectID(); return getNodesWithKeys(keys, mapObjectID); }
@Override public <K> Map<K, Set<NodeID>> getNodesWithKeys(final TCMap tcMap, final Collection<? extends K> keys) { waitUntilRunning(); final ObjectID mapObjectID = ((Manageable) tcMap).__tc_managed().getObjectID(); return getNodesWithKeys(keys, mapObjectID); }
@Override public <K> Map<K, Set<NodeID>> getNodesWithKeys(final TCServerMap tcMap, final Collection<? extends K> keys) { final ObjectID mapObjectID = tcMap.__tc_managed().getObjectID(); GroupID groupID = getGroupID(mapObjectID); return getClusterMetaDataManager(groupID).getNodesWithKeys(tcMap, keys); }