private OffHeapValueHolder<V> computeWithRetry(K key, BiFunction<K, OffHeapValueHolder<V>, OffHeapValueHolder<V>> computeFunction, boolean fault) throws StoreAccessException { OffHeapValueHolder<V> computeResult; try { computeResult = backingMap().compute(key, computeFunction, fault); } catch (OversizeMappingException ex) { try { evictionAdvisor().setSwitchedOn(false); invokeValve(); computeResult = backingMap().compute(key, computeFunction, fault); } catch (OversizeMappingException e) { throw new StoreAccessException("The element with key '" + key + "' is too large to be stored" + " in this offheap store.", e); } catch (RuntimeException e) { throw handleException(e); } finally { evictionAdvisor().setSwitchedOn(true); } } catch (RuntimeException re) { throw handleException(re); } return computeResult; }
private OffHeapValueHolder<V> computeWithRetry(K key, BiFunction<K, OffHeapValueHolder<V>, OffHeapValueHolder<V>> computeFunction, boolean fault) throws StoreAccessException { OffHeapValueHolder<V> computeResult; try { computeResult = backingMap().compute(key, computeFunction, fault); } catch (OversizeMappingException ex) { try { evictionAdvisor().setSwitchedOn(false); invokeValve(); computeResult = backingMap().compute(key, computeFunction, fault); } catch (OversizeMappingException e) { throw new StoreAccessException("The element with key '" + key + "' is too large to be stored" + " in this offheap store.", e); } catch (RuntimeException e) { throw handleException(e); } finally { evictionAdvisor().setSwitchedOn(true); } } catch (RuntimeException re) { throw handleException(re); } return computeResult; }