Interface OpSource<T>

Type Parameters:
T -
All Superinterfaces:
java.util.function.LongFunction<T>

public interface OpSource<T>
extends java.util.function.LongFunction<T>
An OpSource provides an Op for a given long value. OpSources are expected to be deterministic with respect to inputs.
  • Method Summary

    Modifier and Type Method Description
    default T apply​(long value)  
    T get​(long selector)
    Get the next operation for the given long value.
    static <O extends io.nosqlbench.engine.api.activityimpl.uniform.flowtypes.Op>
    OpSource<O>
    of​(OpSequence<io.nosqlbench.engine.api.activityimpl.OpDispenser<O>> seq)  
  • Method Details

    • of

      static <O extends io.nosqlbench.engine.api.activityimpl.uniform.flowtypes.Op> OpSource<O> of​(OpSequence<io.nosqlbench.engine.api.activityimpl.OpDispenser<O>> seq)
    • get

      T get​(long selector)
      Get the next operation for the given long value. This is simply the offset indicated by the offset sequence array at a modulo position.
      Parameters:
      selector - the long value that determines the next op
      Returns:
      An op of type T
    • apply

      default T apply​(long value)
      Specified by:
      apply in interface java.util.function.LongFunction<T>