Element oldElement = underlyingStore.getQuiet(key);
if (oldElement == null || !(oldElement.getObjectValue() instanceof SoftLock)) {
SoftLock softLock = softLockFactory.createSoftLock(getCurrentTransactionContext().getTransactionId(), key,
element, oldElement);
softLock.lock();
Element newElement = createElement(key, softLock);
oldElement = underlyingStore.putIfAbsent(newElement);
if (oldElement == null) {
// CAS succeeded, soft lock is in store, job done.
getCurrentTransactionContext().registerSoftLock(cacheName, this, softLock);