use of com.oracle.coherence.hibernate.cache.v53.access.processor.AfterUpdateProcessor in project coherence-hibernate by coherence-community.
the class AbstractReadWriteCoherenceEntityDataAccess method afterUpdate.
/**
* Coherence-based implementation of behavior common to:
* 1. org.hibernate.cache.spi.access.EntityRegionAccessStrategy.afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) and
* 2. org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy.afterUpdate(Object key, Object value, SoftLock lock).
*
* The only difference in implementation is that the cache value in a NaturalIdRegion will have a null version object.
*
* @param key the key at which to insert a value
* @param value the value to insert
* @param softLock the softLock acquired in an earlier lockItem call with the argument key
*
* @return a boolean indicating whether cache contents were modified
*/
protected boolean afterUpdate(Object key, CoherenceRegionValue value, SoftLock softLock) {
long timeOfSoftLockRelease = getCoherenceRegion().nextTimestamp();
AfterUpdateProcessor afterUpdateProcessor = new AfterUpdateProcessor(value, softLock, timeOfSoftLockRelease);
return (Boolean) getCoherenceRegion().invoke(key, afterUpdateProcessor);
}
Aggregations