/** * {@inheritDoc} */ public Element putIfAbsent(Element element) throws NullPointerException { return putIfAbsent(element, false); }
/** * {@inheritDoc} */ public Element putIfAbsent(Element element) throws NullPointerException { return putIfAbsent(element, false); }
/** * {@inheritDoc} */ public Element putIfAbsent(Element element) throws NullPointerException { return putIfAbsent(element, false); }
/** * {@inheritDoc} */ public Element putIfAbsent(Element element) throws NullPointerException { return putIfAbsent(element, false); }
public Element putIfAbsent(Element element) { return delegate.putIfAbsent( element ); }
@Override public boolean markAsDelivered(NotificationId notificationId, SubscriptionId subscriptionId) { Element existing = this.cache.putIfAbsent(new Element( notificationId, subscriptionId)); return existing == null; }
@Override public Object putIfAbsent(String key, Object value) { Element element = new Element(key, value); element = cache.putIfAbsent(element); return element == null ? null : element.getObjectValue(); }
@Override public void putIfAbsent(Object key, Object value) { Element el = new Element(key, value); if (enCache.putIfAbsent(el) == null) { cacheStatistics.incPutTimes(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(name + " add cache ,key:" + key + " value:" + value); } } }
@Override public Object putIfAbsent(String key, Object value, long duration, TimeUnit unit) { Element element = new Element(key, value); element.setTimeToLive((int) unit.toSeconds(duration)); element = cache.putIfAbsent(element); return element == null ? null : element.getObjectValue(); }
@Override public ValueWrapper putIfAbsent(Object key, Object value) { Element existingElement = getCache(CacheConstant.DEFAULT_CACHE_DIR).putIfAbsent(new Element(key, value)); return toWrapper(existingElement); }
Element newElement = new Element(dependencyKey, cacheElement); newElement.setTimeToLive(cacheDependencyTTL); Element oldElement = dependencyCache.putIfAbsent(newElement); if (oldElement != null) { ConcurrentSkipListSet<String> oldCacheSet = ((CacheElement<ConcurrentSkipListSet<String>>) oldElement
currentElement = new Element(key, new CacheElementImpl<T>(null)); setExpired(currentElement, 0); Element oldElement = cache.putIfAbsent(currentElement); if (oldElement != null) { currentElement = oldElement;
WaitingActions waitingActions = new WaitingActions(); element = new Element(missingKey, waitingActions); Element exists = missingCache.putIfAbsent(element); if (exists != null) { newlyAdded = false;
WaitingActions waitingActions = new WaitingActions(); element = new Element(missingKey, waitingActions); Element exists = missingCache.putIfAbsent(element); if (exists != null) { newlyAdded = false;