/** {@inheritDoc} */ @Override public <T> T executeInTransaction( TransactionCallback<T> callback, ExceptionHandlingStrategy exceptionHandlingStrategy) { T result = null; try { result = doExecuteInTransaction(callback); } catch (RuntimeException e) { exceptionHandlingStrategy.handleException(e); } return result; }
@Override public <T> T compute(@NotNull Function0<? extends T> computable) { lock.lock(); try { return computable.invoke(); } catch (Throwable throwable) { throw exceptionHandlingStrategy.handleException(throwable); } finally { lock.unlock(); } }