this.threadId = threadId;
setWaitTimeout(timeout);
}
public void run() throws Exception {
MultiMapContainer container = getOrCreateContainer();
if (!container.txnLock(dataKey, getCallerUuid(), threadId, ttl)) {
throw new TransactionException("Transaction couldn't obtain lock!");
}
MultiMapWrapper wrapper = getOrCreateCollectionWrapper();
final boolean isLocal = getResponseHandler().isLocal();
final MultiMapResponse multiMapResponse = new MultiMapResponse(wrapper.getCollection(isLocal));
multiMapResponse.setNextRecordId(container.nextId());
multiMapResponse.setTxVersion(wrapper.incrementAndGetVersion());
response = multiMapResponse;
}