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 |
|---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
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() |
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, serializeprotected final TypeSerializer<Object>[] fieldSerializers
protected final int arity
public TupleSerializerBase(Class<T> tupleClass, TypeSerializer<?>[] fieldSerializers)
public boolean isImmutableType()
TypeSerializerisImmutableType in class TypeSerializer<T>public int getLength()
TypeSerializergetLength in class TypeSerializer<T>-1 for variable length data types.public int getArity()
public void copy(DataInputView source, DataOutputView target) throws IOException
TypeSerializertarget.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>public boolean canEqual(Object obj)
TypeSerializercanEqual in class TypeSerializer<T>obj - Object which wants to take part in the equality relationCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.