io.nosqlbench.virtdata.core.bindings.VirtDataLibraries Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
package io.nosqlbench.virtdata.core.bindings;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class VirtDataLibraries implements VirtDataFunctionLibrary {
private final static Logger logger = LogManager.getLogger(VirtDataLibraries.class);
private static final VirtDataLibraries instance = new VirtDataLibraries();
private final Map> threadSafeCache = new HashMap<>();
private final VirtDataFunctionResolver resolver = new VirtDataFunctionResolver();
public static VirtDataLibraries get() {
return instance;
}
private VirtDataLibraries() {
}
@Override
public List resolveFunctions(
Class> returnType,
Class> inputType,
String functionName,
Map customConfig,
Object... parameters)
{
List resolvedFunctions = new ArrayList<>();
List resolved = resolver.resolveFunctions(returnType, inputType, functionName, customConfig, parameters);
// Written this way to allow for easy debugging and understanding, do not convert to .stream()...
if (resolved.size()>0) {
resolvedFunctions.addAll(resolved);
}
return resolvedFunctions;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy