Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Override
public <T> T run(final Function<? super Transaction, T> tFunction) {
return database.run(new Function<Transaction, T>() {
int tries = 0;
@Override
public T apply(Transaction tx) {
if (tries++ > 0) {
log.info("Retrying transaction: " + tries);
}
setOptions(tx);
return tFunction.apply(tx);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.