Class VirtDataConversions

java.lang.Object
io.nosqlbench.virtdata.api.bindings.VirtDataConversions

public class VirtDataConversions
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    VirtDataConversions()  
  • Method Summary

    Modifier and Type Method Description
    static <F,​ T> T adaptFunction​(F func, java.lang.Class<T> functionType, java.lang.Class<?>... resultSignature)
    Adapt a functional object into a different type of functional object.
    static <F,​ T> java.util.List<T> adaptFunctionList​(F[] funcs, java.lang.Class<T> functionType, java.lang.Class<java.lang.Object>... resultSignature)  
    static <T> java.util.List<T> getFunctions​(int mod, int offset, java.lang.Class<? extends T> functionType, java.lang.Object... funcs)
    Slice the incoming object list into a set of functions, based on a grouping interval and an offset.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • adaptFunctionList

      public static <F,​ T> java.util.List<T> adaptFunctionList​(F[] funcs, java.lang.Class<T> functionType, java.lang.Class<java.lang.Object>... resultSignature)
    • adaptFunction

      public static <F,​ T> T adaptFunction​(F func, java.lang.Class<T> functionType, java.lang.Class<?>... resultSignature)
      Adapt a functional object into a different type of functional object.
      Type Parameters:
      F - The generic type of function being converted from
      T - The generic type of function being converted to
      Parameters:
      func - The original function object.
      functionType - The type of the function you need
      resultSignature - The signature of all output types, linearized for use after type-erasure.
      Returns:
      An instance of T
    • getFunctions

      public static <T> java.util.List<T> getFunctions​(int mod, int offset, java.lang.Class<? extends T> functionType, java.lang.Object... funcs)
      Slice the incoming object list into a set of functions, based on a grouping interval and an offset.
      Parameters:
      mod - The grouping interval, or modulo to slice the function groups into
      offset - The offset within the group for the provided function
      funcs - A list of source objects to convert to functions.
      Returns: