Class GroovyObjectEqualityFunction
java.lang.Object
io.nosqlbench.adapters.api.evalctx.GroovyCycleFunction<Boolean>
io.nosqlbench.adapters.api.evalctx.GroovyObjectEqualityFunction
- All Implemented Interfaces:
CycleFunction<Boolean>,ExpressionDetails,VariableInjectable,LongFunction<Boolean>
This evaluator uses
Object.equals(Object) to compare the results of an operation with
a constructed value. The script used is meant to only construct the object to compare with.
All context variables can be injected into the script context except for one, the result
variable. This is intercepted and then used as a basis for comparison to the result of executing the
script.-
Field Summary
Fields inherited from class io.nosqlbench.adapters.api.evalctx.GroovyCycleFunction
bindingFunctions, script, scriptText, variableBindings -
Constructor Summary
ConstructorsConstructorDescriptionGroovyObjectEqualityFunction(String name, ParsedTemplateString template, List<String> imports, List<Class<?>> staticImports, groovy.lang.Binding binding) -
Method Summary
Modifier and TypeMethodDescriptionapply(long value) Produce a result from a cycle.voidsetVariable(String name, Object value) Intercept and reserve the value of the result injected variable for comparison to the evaluated script result later.Methods inherited from class io.nosqlbench.adapters.api.evalctx.GroovyCycleFunction
expandClassNames, getExpressionDetails, newInstance
-
Constructor Details
-
GroovyObjectEqualityFunction
-
-
Method Details
-
apply
Description copied from interface:CycleFunctionProduce a result from a cycle. This is an encapsulating type for any implementations which need to- Specified by:
applyin interfaceCycleFunction<Boolean>- Specified by:
applyin interfaceLongFunction<Boolean>- Overrides:
applyin classGroovyCycleFunction<Boolean>- Parameters:
value- the function argument- Returns:
-
setVariable
Intercept and reserve the value of the result injected variable for comparison to the evaluated script result later.- Specified by:
setVariablein interfaceVariableInjectable- Overrides:
setVariablein classGroovyCycleFunction<Boolean>
-