Package | Description |
---|---|
org.apache.cassandra.cql3.functions | |
org.apache.cassandra.cql3.functions.types |
Contains pieces of the Java Driver that are needed to handle data types
in C* User-Defined-Functions/Aggregates.
|
Modifier and Type | Field and Description |
---|---|
protected TypeCodec<java.lang.Object>[] |
UDFunction.argCodecs |
protected TypeCodec<java.lang.Object> |
UDFunction.returnCodec |
Modifier and Type | Method and Description |
---|---|
static TypeCodec<java.lang.Object> |
UDHelper.codecFor(DataType dataType) |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
UDHelper.asJavaClass(TypeCodec<?> codec) |
protected static java.lang.Object |
UDFunction.compose(TypeCodec<java.lang.Object>[] codecs,
ProtocolVersion protocolVersion,
int argIndex,
java.nio.ByteBuffer value) |
protected static java.nio.ByteBuffer |
UDFunction.decompose(TypeCodec<java.lang.Object> codec,
ProtocolVersion protocolVersion,
java.lang.Object value) |
static java.lang.Object |
UDHelper.deserialize(TypeCodec<?> codec,
ProtocolVersion protocolVersion,
java.nio.ByteBuffer value) |
static java.nio.ByteBuffer |
UDHelper.serialize(TypeCodec<?> codec,
ProtocolVersion protocolVersion,
java.lang.Object value) |
static com.google.common.reflect.TypeToken<?>[] |
UDHelper.typeTokens(TypeCodec<java.lang.Object>[] dataTypes,
boolean calledOnNullInput)
Construct an array containing the Java classes for the given
DataType s. |
Constructor and Description |
---|
JavaUDF(TypeCodec<java.lang.Object> returnCodec,
TypeCodec<java.lang.Object>[] argCodecs,
UDFContext udfContext) |
JavaUDF(TypeCodec<java.lang.Object> returnCodec,
TypeCodec<java.lang.Object>[] argCodecs,
UDFContext udfContext) |
Modifier and Type | Class and Description |
---|---|
static class |
TypeCodec.AbstractCollectionCodec<E,C extends java.util.Collection<E>>
|
static class |
TypeCodec.AbstractMapCodec<K,V>
Base class for codecs mapping CQL
maps to a Java
Map . |
static class |
TypeCodec.AbstractTupleCodec<T>
Base class for codecs mapping CQL
tuples to Java objects. |
static class |
TypeCodec.AbstractUDTCodec<T>
Base class for codecs mapping CQL
user-defined types (UDTs) to Java objects. |
static class |
TypeCodec.PrimitiveBooleanCodec
A codec that is capable of handling primitive booleans, thus avoiding the overhead of boxing
and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveByteCodec
A codec that is capable of handling primitive bytes, thus avoiding the overhead of boxing and
unboxing such primitives.
|
static class |
TypeCodec.PrimitiveDoubleCodec
A codec that is capable of handling primitive doubles, thus avoiding the overhead of boxing and
unboxing such primitives.
|
static class |
TypeCodec.PrimitiveFloatCodec
A codec that is capable of handling primitive floats, thus avoiding the overhead of boxing and
unboxing such primitives.
|
static class |
TypeCodec.PrimitiveIntCodec
A codec that is capable of handling primitive ints, thus avoiding the overhead of boxing and
unboxing such primitives.
|
static class |
TypeCodec.PrimitiveLongCodec
A codec that is capable of handling primitive longs, thus avoiding the overhead of boxing and
unboxing such primitives.
|
static class |
TypeCodec.PrimitiveShortCodec
A codec that is capable of handling primitive shorts, thus avoiding the overhead of boxing and
unboxing such primitives.
|
Modifier and Type | Method and Description |
---|---|
static TypeCodec<java.lang.String> |
TypeCodec.ascii()
Return the default codec for the CQL type
ascii . |
static TypeCodec<java.nio.ByteBuffer> |
TypeCodec.blob()
Return the default codec for the CQL type
blob . |
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
java.lang.Class<T> javaType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
T value)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
com.google.common.reflect.TypeToken<T> javaType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(T value)
Returns a
codec that accepts the given value. |
static TypeCodec<java.nio.ByteBuffer> |
TypeCodec.custom(DataType.CustomType type)
Return a newly-created codec for the given CQL custom type.
|
static TypeCodec<LocalDate> |
TypeCodec.date()
Return the default codec for the CQL type
date . |
static TypeCodec<java.math.BigDecimal> |
TypeCodec.decimal()
Return the default codec for the CQL type
decimal . |
static TypeCodec<Duration> |
TypeCodec.duration()
Returns the default codec for the
Duration type . |
static TypeCodec<java.net.InetAddress> |
TypeCodec.inet()
Return the default codec for the CQL type
inet . |
static <T> TypeCodec<java.util.List<T>> |
TypeCodec.list(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
list whose element type is determined by
the given element codec. |
static <K,V> TypeCodec<java.util.Map<K,V>> |
TypeCodec.map(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Return a newly-created codec for the CQL type
map whose key type and value type are
determined by the given codecs. |
static <T> TypeCodec<java.util.Set<T>> |
TypeCodec.set(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
set whose element type is determined by
the given element codec. |
static TypeCodec<java.util.Date> |
TypeCodec.timestamp()
Return the default codec for the CQL type
timestamp . |
static TypeCodec<java.util.UUID> |
TypeCodec.timeUUID()
Return the default codec for the CQL type
timeuuid . |
static TypeCodec<TupleValue> |
TypeCodec.tuple(TupleType type)
Return a newly-created codec for the given CQL tuple type.
|
static TypeCodec<UDTValue> |
TypeCodec.userType(UserType type)
Return a newly-created codec for the given user-defined CQL type.
|
static TypeCodec<java.util.UUID> |
TypeCodec.uuid()
Return the default codec for the CQL type
uuid . |
static TypeCodec<java.lang.String> |
TypeCodec.varchar()
Return the default codec for the CQL type
varchar . |
static TypeCodec<java.math.BigInteger> |
TypeCodec.varint()
Return the default codec for the CQL type
varint . |
Modifier and Type | Method and Description |
---|---|
<T> T |
GettableByIndexData.get(int i,
TypeCodec<T> codec)
Returns the
i th value converted using the given TypeCodec . |
<T> T |
AbstractGettableData.get(java.lang.String name,
TypeCodec<T> codec)
Returns the value for
name converted using the given TypeCodec . |
<T> T |
GettableByNameData.get(java.lang.String name,
TypeCodec<T> codec)
Returns the value for
name converted using the given TypeCodec . |
static <T> TypeCodec<java.util.List<T>> |
TypeCodec.list(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
list whose element type is determined by
the given element codec. |
static <K,V> TypeCodec<java.util.Map<K,V>> |
TypeCodec.map(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Return a newly-created codec for the CQL type
map whose key type and value type are
determined by the given codecs. |
static <K,V> TypeCodec<java.util.Map<K,V>> |
TypeCodec.map(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Return a newly-created codec for the CQL type
map whose key type and value type are
determined by the given codecs. |
CodecRegistry |
CodecRegistry.register(TypeCodec<?>... codecs)
Register the given codecs with this registry.
|
CodecRegistry |
CodecRegistry.register(TypeCodec<?> newCodec)
Register the given codec with this registry.
|
<V> T |
SettableByIndexData.set(int i,
V v,
TypeCodec<V> codec)
Sets the
i th value to the provided value, converted using the given TypeCodec . |
<V> T |
SettableByNameData.set(java.lang.String name,
V v,
TypeCodec<V> codec)
Sets the value for (all occurrences of) variable
name to the provided value, converted
using the given TypeCodec . |
static <T> TypeCodec<java.util.Set<T>> |
TypeCodec.set(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
set whose element type is determined by
the given element codec. |
Modifier and Type | Method and Description |
---|---|
CodecRegistry |
CodecRegistry.register(java.lang.Iterable<? extends TypeCodec<?>> codecs)
Register the given codecs with this registry.
|
Copyright © 2009-2022 The Apache Software Foundation