示例#1
0
 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;
 }
示例#2
0
 /** {@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);
 }
示例#3
0
 /** {@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));
 }