-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for "force_map_call" option
Closes #459
- Loading branch information
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ain/java/io/tarantool/driver/api/space/options/crud/OperationWithForceMapCallOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package io.tarantool.driver.api.space.options.crud; | ||
|
||
import java.util.Optional; | ||
|
||
import io.tarantool.driver.api.space.options.Options; | ||
import io.tarantool.driver.api.space.options.Self; | ||
import io.tarantool.driver.api.space.options.crud.enums.ProxyOption; | ||
|
||
/** | ||
* Base interface for all operation options that may have a configurable "force_map_call" option. | ||
* | ||
* @author Belonogov Nikolay | ||
*/ | ||
public interface OperationWithForceMapCallOptions<T extends OperationWithForceMapCallOptions<T>> | ||
extends Options, Self<T> { | ||
|
||
/** | ||
* Sets "force_map_call" option to true. if true then the map call is performed without any optimizations even, | ||
* default value is false. | ||
* | ||
* @return forceMapCall option value. | ||
*/ | ||
default T forceMapCall() { | ||
addOption(ProxyOption.FORCE_MAP_CALL, true); | ||
return self(); | ||
} | ||
|
||
/** | ||
* @return "force_map_call" option value. | ||
*/ | ||
default Optional<Boolean> getForceMapCall() { | ||
return getOption(ProxyOption.FORCE_MAP_CALL, Boolean.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters