/** * {@inheritDoc} */ public void throwAway(final CacheWriter cacheWriter, final RuntimeException e) { Element element = entry.getElement(); if (element == null) { element = new Element(entry.getKey(), null); } cacheWriter.throwAway(element, SingleOperationType.DELETE, e); }
private Element removeInternal(final StoreRemoveCommand command) { Element element = command.getEntry().getElement(); getOrCreateTransactionContext().addCommand(command, element); return element; }
@Override public void delete(CacheEntry entry) { async.add(new DeleteAsyncOperation(entry.getKey(), entry.getElement())); }
private CacheEntry duplicateCacheEntryElement(CacheEntry entry) { if (null == entry.getElement()) { return entry; } else { Element element = entry.getElement(); return new CacheEntry(entry.getKey(), new Element(element.getObjectKey(), element.getObjectValue(), element.getVersion(), element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), false, element.getTimeToLive(), element.getTimeToIdle(), element.getLastUpdateTime())); } }
/** * {@inheritDoc} */ public void throwAway(final CacheWriter cacheWriter, final RuntimeException e) { Element element = entry.getElement(); if (element == null) { element = new Element(entry.getKey(), null); } cacheWriter.throwAway(element, SingleOperationType.DELETE, e); }
/** * {@inheritDoc} */ public void throwAway(final CacheWriter cacheWriter, final RuntimeException e) { Element element = entry.getElement(); if (element == null) { element = new Element(entry.getKey(), null); } cacheWriter.throwAway(element, SingleOperationType.DELETE, e); }
/** * {@inheritDoc} */ public void throwAway(final CacheWriter cacheWriter, final RuntimeException e) { Element element = entry.getElement(); if (element == null) { element = new Element(entry.getKey(), null); } cacheWriter.throwAway(element, SingleOperationType.DELETE, e); }
/** * {@inheritDoc} * * Remove data and keys from the underlying store for the given collection of keys, if present. If this operation fails * (by throwing an exception) after a partial success, the convention is that keys which have been erased successfully * are to be removed from the specified keys, indicating that the erase operation for the keys left in the collection * has failed or has not been attempted. */ public void deleteAll(Collection<CacheEntry> entries) throws CacheException { Set<javax.cache.Cache.Entry<K, V>> javaxCacheEntries = new HashSet<javax.cache.Cache.Entry<K, V>>(); for (CacheEntry e : entries) { javaxCacheEntries.add(new JCacheEntry<K, V>(e.getElement(), keyType, valueType)); } jsr107CacheWriter.deleteAll(javaxCacheEntries); }
/** * {@inheritDoc} * * Remove data and keys from the underlying store for the given collection of keys, if present. If this operation fails * (by throwing an exception) after a partial success, the convention is that keys which have been erased successfully * are to be removed from the specified keys, indicating that the erase operation for the keys left in the collection * has failed or has not been attempted. */ public void deleteAll(Collection<CacheEntry> entries) throws CacheException { Set<javax.cache.Cache.Entry<K, V>> javaxCacheEntries = new HashSet<javax.cache.Cache.Entry<K, V>>(); for (CacheEntry e : entries) { javaxCacheEntries.add(new JCacheEntry<K, V>(e.getElement(), keyType, valueType)); } jsr107CacheWriter.deleteAll(javaxCacheEntries); }
private Element removeInternal(final StoreRemoveCommand command) { Element element = command.getEntry().getElement(); getOrCreateTransactionContext().addCommand(command, element); return element; }
private CacheEntry duplicateCacheEntryElement(CacheEntry entry) { if (null == entry.getElement()) { return entry; } else { Element element = entry.getElement(); return new CacheEntry(entry.getKey(), new Element(element.getObjectKey(), element.getObjectValue(), element.getVersion(), element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), false, element.getTimeToLive(), element.getTimeToIdle(), element.getLastUpdateTime())); } }
private Element removeInternal(final StoreRemoveCommand command) { Element element = command.getEntry().getElement(); getOrCreateTransactionContext().addCommand(command, element); return element; }
private CacheEntry duplicateCacheEntryElement(CacheEntry entry) { if (null == entry.getElement()) { return entry; } else { Element element = entry.getElement(); return new CacheEntry(entry.getKey(), new Element(element.getObjectKey(), element.getObjectValue(), element.getVersion(), element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), false, element.getTimeToLive(), element.getTimeToIdle(), element.getLastUpdateTime())); } }
private CacheEntry duplicateCacheEntryElement(CacheEntry entry) { if (null == entry.getElement()) { return entry; } else { Element element = entry.getElement(); return new CacheEntry(entry.getKey(), new Element(element.getObjectKey(), element.getObjectValue(), element.getVersion(), element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), false, element.getTimeToLive(), element.getTimeToIdle(), element.getLastUpdateTime())); } }
private Element removeInternal(final StoreRemoveCommand command) { Element element = command.getEntry().getElement(); getOrCreateTransactionContext().addCommand(command, element); return copyElementForRead(element); }
public void delete(CacheEntry entry) { async.add(new DeleteAsyncOperation(createKeySnapshot(entry.getKey()), createElementSnapshot(entry.getElement()))); }