use of com.oracle.coherence.hibernate.cache.v53.access.processor.SoftLockItemProcessor in project coherence-hibernate by coherence-community.
the class AbstractReadWriteCoherenceEntityDataAccess method lockItem.
/**
* {@inheritDoc}
*/
@Override
public org.hibernate.cache.spi.access.SoftLock lockItem(SharedSessionContractImplementor session, Object key, Object version) throws CacheException {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("lockItem({}, {})", key, version);
}
CoherenceRegionValue valueIfAbsent = newCacheValue(null, version);
CoherenceRegionValue.SoftLock newSoftLock = newSoftLock();
SoftLockItemProcessor processor = new SoftLockItemProcessor(valueIfAbsent, newSoftLock);
getCoherenceRegion().invoke(key, processor);
return newSoftLock;
}
Aggregations