io.nosqlbench.virtdata.api.composers.FunctionComposer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-curves4 Show documentation
Show all versions of virtdata-lib-curves4 Show documentation
Statistical sampling library for use in virtdata libraries, based
on apache commons math 4
package io.nosqlbench.virtdata.api.composers;
import io.nosqlbench.virtdata.annotations.ThreadSafeMapper;
import io.nosqlbench.virtdata.api.DataMapper;
import io.nosqlbench.virtdata.api.DataMapperFunctionMapper;
import io.nosqlbench.virtdata.api.ResolvedFunction;
public interface FunctionComposer {
Object getFunctionObject();
FunctionComposer andThen(Object outer);
default ResolvedFunction getResolvedFunction() {
return new ResolvedFunction(
getFunctionObject(),
getFunctionObject().getClass().getAnnotation(ThreadSafeMapper.class) != null,
null, null,
null, null
);
}
default ResolvedFunction getResolvedFunction(boolean isThreadSafe) {
return new ResolvedFunction(
getFunctionObject(),
isThreadSafe,
null, null,
null, null
);
}
default DataMapper getDataMapper() {
return DataMapperFunctionMapper.map(getFunctionObject());
}
}