Class CqlDurationFunctions

java.lang.Object
io.nosqlbench.datamappers.functions.long_to_cqlduration.CqlDurationFunctions
All Implemented Interfaces:
LongFunction<com.datastax.oss.driver.api.core.data.CqlDuration>

public class CqlDurationFunctions extends Object implements LongFunction<com.datastax.oss.driver.api.core.data.CqlDuration>
Map a long value into a CQL Duration object based on a set of field functions.
  • Constructor Details

    • CqlDurationFunctions

      public CqlDurationFunctions(Object monthsFunc, Object daysFunc, Object nanosFunc)
      Create a CQL Duration object from the two provided field functions. The months field is always set to zero in this form.
      Parameters:
      monthsFunc - A function that will yield the months value
      daysFunc - A function that will yield the days value
      nanosFunc - A function that will yeild the nanos value
    • CqlDurationFunctions

      public CqlDurationFunctions(Object daysFunc, Object nanosFunc)
      Create a CQL Duration object from the two provided field functions. The months field is always set to zero in this form.
      Parameters:
      daysFunc - A function that will yield the days value
      nanosFunc - A function that will yeild the nanos value
  • Method Details

    • apply

      public com.datastax.oss.driver.api.core.data.CqlDuration apply(long value)
      Specified by:
      apply in interface LongFunction<com.datastax.oss.driver.api.core.data.CqlDuration>