All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tarantool.driver.core.proxy.CRUDBatchOptions Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
package io.tarantool.driver.core.proxy;

import java.util.Optional;

/**
 * This class is not part of the public API.
 * 

* Represent options for proxy cluster batch operations * * @author Alexey Kuzin */ final class CRUDBatchOptions extends CRUDReturnOptions { public static final String BATCH_STOP_ON_ERROR = "stop_on_error"; public static final String BATCH_ROLLBACK_ON_ERROR = "rollback_on_error"; private > CRUDBatchOptions(AbstractBuilder builder) { super(builder); addOption(BATCH_STOP_ON_ERROR, builder.stopOnError); addOption(BATCH_ROLLBACK_ON_ERROR, builder.rollbackOnError); } protected abstract static class AbstractBuilder> extends CRUDReturnOptions.AbstractBuilder { private Optional stopOnError = Optional.empty(); private Optional rollbackOnError = Optional.empty(); public B withStopOnError(Optional stopOnError) { this.stopOnError = stopOnError; return self(); } public B withRollbackOnError(Optional rollbackOnError) { this.rollbackOnError = rollbackOnError; return self(); } } protected static final class Builder extends AbstractBuilder { @Override Builder self() { return this; } @Override public CRUDBatchOptions build() { return new CRUDBatchOptions(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy