/** * Allows null as new value to accommodate create with a null value. * * @param event the event object for this operation, with the exception that the oldValue * parameter is not yet filled in. The oldValue will be filled in by this operation. * @param lastModified the lastModified time to set with the value; if 0L then the lastModified * time will be set to now. * @return null if put not done; otherwise the put entry */ protected RegionEntry basicPutEntry(final EntryEventImpl event, final long lastModified) throws TimeoutException, CacheWriterException { discoverJTA(); TXStateInterface tx = getTXState(); // Note we are doing a load or netsearch result so it seems like we should set ifNew to true. // The entry should not yet exist. However since the non-tx code sets ifNew to false this code // will also. final boolean ifNew = false; if (isTX()) { tx.txPutEntry(event, ifNew, false, false, null); return null; } else { if (DistTXState.internalBeforeNonTXBasicPut != null) { DistTXState.internalBeforeNonTXBasicPut.run(); } return getRegionMap().basicPut(event, lastModified, ifNew, false, null, false, false); } }
oldEntry = this.entries.basicPut(event, lastModified, ifNew, ifOld, expectedOldValue, requireOldValue, overwriteDestroyed); } catch (ConcurrentCacheModificationException ignore) {
RegionEntry oldEntry = this.entries.basicPut(event, lastModified, ifNew, ifOld, expectedOldValue, requireOldValue, overwriteDestroyed); return oldEntry != null;