io.tarantool.driver.core.proxy.CRUDInsertOptions Maven / Gradle / Ivy
Show all versions of cartridge-driver Show documentation
package io.tarantool.driver.core.proxy;
import java.util.List;
import java.util.Optional;
/**
* This class is not part of the public API.
*
* Represent options for cluster insert operation.
*
* @author Alexey Kuzin
* @author Artyom Dubinin
*/
class CRUDInsertOptions extends CRUDBucketIdOptions {
public static final String FIELDS = "fields";
protected >
CRUDInsertOptions(CRUDInsertOptions.AbstractBuilder builder) {
super(builder);
addOption(FIELDS, builder.fields);
}
protected abstract static
class AbstractBuilder>
extends CRUDBucketIdOptions.AbstractBuilder {
private Optional fields = Optional.empty();
public B withFields(Optional fields) {
this.fields = fields;
return self();
}
}
protected static final class Builder extends AbstractBuilder {
@Override
CRUDInsertOptions.Builder self() {
return this;
}
@Override
public CRUDInsertOptions build() {
return new CRUDInsertOptions(this);
}
}
}