/** * Prefetch object by ID, faulting into the JVM if necessary, Async lookup and will not cause ObjectNotFoundException * like lookupObject. Non-existent objects are ignored by the server. * * @param id Object identifier * @throws AbortedOperationException */ @Override public void preFetchObject(final ObjectID id) throws AbortedOperationException { if (id.isNull()) return; synchronized (this) { if (basicHasLocal(id) || this.objectLatchStateMap.get(id) != null) { return; } // We are temporarily marking lookup in progress so that no other thread sneaks in under us and does a lookup // while we are calling prefetch } this.remoteObjectManager.preFetchObject(id); }
/** * Prefetch object by ID, faulting into the JVM if necessary, Async lookup and will not cause ObjectNotFoundException * like lookupObject. Non-existent objects are ignored by the server. * * @param id Object identifier * @throws AbortedOperationException */ @Override public void preFetchObject(final ObjectID id) throws AbortedOperationException { if (id.isNull()) return; synchronized (this) { if (basicHasLocal(id) || this.objectLatchStateMap.get(id) != null) { return; } // We are temporarily marking lookup in progress so that no other thread sneaks in under us and does a lookup // while we are calling prefetch } this.remoteObjectManager.preFetchObject(id); }
/** * Prefetch object by ID, faulting into the JVM if necessary, Async lookup and will not cause ObjectNotFoundException * like lookupObject. Non-existent objects are ignored by the server. * * @param id Object identifier * @throws AbortedOperationException */ @Override public void preFetchObject(final ObjectID id) throws AbortedOperationException { if (id.isNull()) return; synchronized (this) { if (basicHasLocal(id) || this.objectLatchStateMap.get(id) != null) { return; } // We are temporarily marking lookup in progress so that no other thread sneaks in under us and does a lookup // while we are calling prefetch } this.remoteObjectManager.preFetchObject(id); }
private synchronized void basicAddLocal(final TCObject obj) { final ObjectID id = obj.getObjectID(); if (basicHasLocal(id)) { throw Assert.failure("Attempt to add an object that already exists: Object of class " + obj.getClass() + " [Identity Hashcode : 0x" + Integer.toHexString(System.identityHashCode(obj)) + "] "); } this.objectStore.add(obj); final Object pojo = obj.getPeerObject(); if (pojo != null) { if (pojo instanceof Manageable) { final Manageable m = (Manageable) pojo; if (m.__tc_managed() == null) { m.__tc_managed(obj); } else { Assert.assertTrue(m.__tc_managed() == obj); } } else { if (!isLiteralPojo(pojo)) { this.pojoToManaged.put(pojo, obj); } } } }
private synchronized void basicAddLocal(final TCObject obj) { final ObjectID id = obj.getObjectID(); if (basicHasLocal(id)) { throw Assert.failure("Attempt to add an object that already exists: Object of class " + obj.getClass() + " [Identity Hashcode : 0x" + Integer.toHexString(System.identityHashCode(obj)) + "] "); } this.objectStore.add(obj); final Object pojo = obj.getPeerObject(); if (pojo != null) { if (pojo instanceof Manageable) { final Manageable m = (Manageable) pojo; if (m.__tc_managed() == null) { m.__tc_managed(obj); } else { Assert.assertTrue(m.__tc_managed() == obj); } } else { if (!isLiteralPojo(pojo)) { this.pojoToManaged.put(pojo, obj); } } } }
private synchronized void basicAddLocal(final TCObject obj) { final ObjectID id = obj.getObjectID(); if (basicHasLocal(id)) { throw Assert.failure("Attempt to add an object that already exists: Object of class " + obj.getClass() + " [Identity Hashcode : 0x" + Integer.toHexString(System.identityHashCode(obj)) + "] "); } this.objectStore.add(obj); final Object pojo = obj.getPeerObject(); if (pojo != null) { if (pojo instanceof Manageable) { final Manageable m = (Manageable) pojo; if (m.__tc_managed() == null) { m.__tc_managed(obj); } else { Assert.assertTrue(m.__tc_managed() == obj); } } else { if (!isLiteralPojo(pojo)) { this.pojoToManaged.put(pojo, obj); } } } }