/** * Sets the object to be invalid in the cache. * @see JpaCache#evict(Object) */ public void evict(Object object) { getEntityManagerFactory().verifyOpen(); getAccessor().invalidateObject(object); }
/** * Sets an Object to be invalid in the cache. * If true is passed, the object is also invalidated across cache coordination. * Cache coordination must be enabled for this to have an affect. */ public void evict(Object object, boolean invalidateInCluster) { getEntityManagerFactory().verifyOpen(); getAccessor().invalidateObject(object, invalidateInCluster); }
/** * INTERNAL: * Check the row count for lock failure. */ public void validateDelete(int rowCount, Object object, DeleteObjectQuery query) { if (rowCount <= 0) { // Mark the object as invalid in the session cache. query.getSession().getParentIdentityMapSession(query, true, true).getIdentityMapAccessor().invalidateObject(object); throw OptimisticLockException.objectChangedSinceLastReadWhenDeleting(object, query); } }
/** * INTERNAL: * Check the row count for lock failure. */ public void validateDelete(int rowCount, Object object, DeleteObjectQuery query) { if (rowCount <= 0) { // Mark the object as invalid in the session cache. query.getSession().getParentIdentityMapSession(query, true, true).getIdentityMapAccessor().invalidateObject(object); throw OptimisticLockException.objectChangedSinceLastReadWhenDeleting(object, query); } }
/** * INTERNAL: * Check the row count for lock failure. */ public void validateUpdate(int rowCount, Object object, WriteObjectQuery query) { if (rowCount <= 0) { // Mark the object as invalid in the session cache. query.getSession().getParentIdentityMapSession(query, true, true).getIdentityMapAccessor().invalidateObject(object); throw OptimisticLockException.objectChangedSinceLastReadWhenUpdating(object, query); } }
/** * INTERNAL: * Check the row count for lock failure. */ public void validateUpdate(int rowCount, Object object, WriteObjectQuery query) { if (rowCount <= 0) { // Mark the object as invalid in the session cache. query.getSession().getParentIdentityMapSession(query, true, true).getIdentityMapAccessor().invalidateObject(object); throw OptimisticLockException.objectChangedSinceLastReadWhenUpdating(object, query); } }
/** * INTERNAL: * Check the row count for lock failure. */ public void validateDelete(int rowCount, Object object, DeleteObjectQuery query) { if (rowCount <= 0) { // Mark the object as invalid in the session cache. query.getSession().getParentIdentityMapSession(query, true, true).getIdentityMapAccessor().invalidateObject(object); throw OptimisticLockException.objectChangedSinceLastReadWhenDeleting(object, query); } }
/** * INTERNAL: * Check the row count for lock failure. */ public void validateUpdate(int rowCount, Object object, WriteObjectQuery query) { if (rowCount <= 0) { // Mark the object as invalid in the session cache. query.getSession().getParentIdentityMapSession(query, true, true).getIdentityMapAccessor().invalidateObject(object); throw OptimisticLockException.objectChangedSinceLastReadWhenUpdating(object, query); } }
getAccessor().invalidateObject(createPrimaryKeyFromId(possibleSuperclass, id), candidateAssignableDescriptor.getJavaClass());
Object cacheKey = createPrimaryKeyFromId(classToEvict, id); if(null != cacheKey) { getAccessor().invalidateObject(cacheKey, classToEvict, invalidateInCluster);
parentSession.getIdentityMapAccessor().invalidateObject(key, changeRecord.getOwner().getClassType(parentSession)); return; parentSession.getIdentityMapAccessor().invalidateObject(key, changeRecord.getOwner().getClassType(parentSession)); return;
targetSession.getIdentityMapAccessor().invalidateObject(key, changeRecord.getOwner().getClassType(targetSession)); return; targetSession.getIdentityMapAccessor().invalidateObject(key, changeRecord.getOwner().getClassType(targetSession)); return;
targetSession.getIdentityMapAccessor().invalidateObject(key, changeRecord.getOwner().getClassType(targetSession)); return; targetSession.getIdentityMapAccessor().invalidateObject(key, changeRecord.getOwner().getClassType(targetSession)); return;
session.getParentIdentityMapSession(this, true, true).getIdentityMapAccessor().invalidateObject(getSelectionKey(), getReferenceClass()); } else if (getSelectionObject() != null) { session.getParentIdentityMapSession(this, true, true).getIdentityMapAccessor().invalidateObject(getSelectionObject());
session.getParentIdentityMapSession(this.descriptor, true, true).getIdentityMapAccessor().invalidateObject(this.selectionId, this.referenceClass); } else if (this.selectionObject != null) { session.getParentIdentityMapSession(this.descriptor, true, true).getIdentityMapAccessor().invalidateObject(this.selectionObject);
session.getParentIdentityMapSession(this.descriptor, true, true).getIdentityMapAccessor().invalidateObject(this.selectionId, this.referenceClass); } else if (this.selectionObject != null) { session.getParentIdentityMapSession(this.descriptor, true, true).getIdentityMapAccessor().invalidateObject(this.selectionObject);
parent.getIdentityMapAccessor().invalidateObject(original);
targetSession.getIdentityMapAccessor().invalidateObject(original);
targetSession.getIdentityMapAccessor().invalidateObject(original);