C# Class Org.Neo4j.Helpers.TransactionTemplate

Neo4j transaction template that automates the retry-on-exception logic. It uses the builder pattern for configuration, with copy-semantics, so you can iteratively build up instances for different scenarios.

First instantiate and configure the template using the fluent API methods, and then invoke execute which will begin/commit transactions in a loop for the specified number of times.

By default all exceptions (except Errors and TransactionTerminatedException) cause a retry, and the monitor does nothing, but these can be overridden with custom behavior. A bit more narrow and typical exception to retry on is TransientFailureException, which aims to represent exceptions that are most likely to succeed after a retry.

Afficher le fichier Open project: Neo4Net/Neo4Net Class Usage Examples

Méthodes publiques

Méthode Description
TransactionTemplate ( ) : System

Creates a template for performing transactions with retry logic.

Default exceptions to retry on is everything except System.Exception and TransactionTerminatedException.

Method Details

TransactionTemplate() public méthode

Creates a template for performing transactions with retry logic.

Default exceptions to retry on is everything except System.Exception and TransactionTerminatedException.

public TransactionTemplate ( ) : System
Résultat System