@Internal public abstract class TupleSerializerBase<T> extends TypeSerializer<T>
Modifier and Type | Field and Description |
---|---|
protected int |
arity |
protected TypeSerializer<Object>[] |
fieldSerializers |
protected Class<T> |
tupleClass |
Constructor and Description |
---|
TupleSerializerBase(Class<T> tupleClass,
TypeSerializer<?>[] fieldSerializers) |
Modifier and Type | Method and Description |
---|---|
void |
copy(DataInputView source,
DataOutputView target)
Copies exactly one record from the source input view to the target output view.
|
abstract T |
createInstance(Object[] fields) |
abstract T |
createOrReuseInstance(Object[] fields,
T reuse) |
boolean |
equals(Object obj) |
int |
getArity() |
TypeSerializer<Object>[] |
getFieldSerializers() |
int |
getLength()
Gets the length of the data type, if it is a fix length data type.
|
Class<T> |
getTupleClass() |
int |
hashCode() |
boolean |
isImmutableType()
Gets whether the type is an immutable type.
|
copy, copy, createInstance, deserialize, deserialize, duplicate, serialize, snapshotConfiguration
protected TypeSerializer<Object>[] fieldSerializers
protected final int arity
public TupleSerializerBase(Class<T> tupleClass, TypeSerializer<?>[] fieldSerializers)
public boolean isImmutableType()
TypeSerializer
isImmutableType
in class TypeSerializer<T>
public int getLength()
TypeSerializer
getLength
in class TypeSerializer<T>
-1
for variable length data types.public int getArity()
public void copy(DataInputView source, DataOutputView target) throws IOException
TypeSerializer
target.write(source, 8);
.copy
in class TypeSerializer<T>
source
- The input view from which to read the record.target
- The target output view to which to write the record.IOException
- Thrown if any of the two views raises an exception.public int hashCode()
hashCode
in class TypeSerializer<T>
public boolean equals(Object obj)
equals
in class TypeSerializer<T>
@VisibleForTesting public TypeSerializer<Object>[] getFieldSerializers()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.