Example usage for io.vertx.sqlclient Transaction abortHandler

List of usage examples for io.vertx.sqlclient Transaction abortHandler

Introduction

In this page you can find the example usage for io.vertx.sqlclient Transaction abortHandler.

Prototype

@Fluent
Transaction abortHandler(Handler<Void> handler);

Source Link

Document

Set an handler to be called when the transaction is aborted.

Usage

From source file:examples.SqlClientExamples.java

License:Apache License

public void transaction02(Transaction tx) {
    tx.abortHandler(v -> {
        System.out.println("Transaction failed => rollbacked");
    });//  www.j a v  a 2  s  . c o  m
}