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 Summary
ConstructorsConstructorDescriptionCqlDurationFunctions(Object daysFunc, Object nanosFunc) Create a CQL Duration object from the two provided field functions.CqlDurationFunctions(Object monthsFunc, Object daysFunc, Object nanosFunc) Create a CQL Duration object from the two provided field functions. -
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.data.CqlDurationapply(long value)
-
Constructor Details
-
CqlDurationFunctions
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 valuedaysFunc- A function that will yield the days valuenanosFunc- A function that will yeild the nanos value
-
CqlDurationFunctions
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 valuenanosFunc- 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:
applyin interfaceLongFunction<com.datastax.oss.driver.api.core.data.CqlDuration>
-