C# Класс 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.

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
TransactionTemplate ( ) : System

Creates a template for performing transactions with retry logic.

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

Описание методов

TransactionTemplate() публичный Метод

Creates a template for performing transactions with retry logic.

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

public TransactionTemplate ( ) : System
Результат System