private Element getCurrentElement(final Object key, final XATransactionContext context) { Element previous = context.get(key); if (previous == null && !context.isRemoved(key)) { previous = getQuietFromUnderlyingStore(key); } return previous; }
/** {@inheritDoc} */ public Element getQuiet(Object key) { LOG.debug("cache {} getQuiet {}", cache.getName(), key); XATransactionContext context = getTransactionContext(); Element element; if (context == null) { element = getQuietFromUnderlyingStore(key); } else { element = context.get(key); if (element == null && !context.isRemoved(key)) { element = getQuietFromUnderlyingStore(key); } } return copyElementForRead(element); }
/** {@inheritDoc} */ public boolean containsKey(Object key) { LOG.debug("cache {} containsKey", cache.getName(), key); XATransactionContext context = getOrCreateTransactionContext(); return !context.isRemoved(key) && (context.getAddedKeys().contains(key) || underlyingStore.containsKey(key)); }