public class InternalMapSerializer extends Object implements Serializer<InternalMap>
InternalMap.| Constructor and Description |
|---|
InternalMapSerializer(DataType keyType,
DataType valueType) |
| Modifier and Type | Method and Description |
|---|---|
static Map<Object,Object> |
convertToJavaMap(InternalMap map,
DataType keyType,
DataType valueType)
Converts a
InternalMap into Java Map, the keys and values of the Java map
still holds objects of internal data structures. |
InternalMap |
copy(InternalMap from)
NOTE: Map should be a HashMap, when we insert the key/value pairs of the TreeMap into a
HashMap, problems maybe occur.
|
InternalMap |
deserialize(DataInputView source)
De-serializes a record from the given source input view.
|
Serializer<InternalMap> |
duplicate()
Creates a deep copy of this serializer if it is necessary, i.e.
|
boolean |
equals(Object o) |
int |
hashCode() |
void |
serialize(InternalMap record,
DataOutputView target)
Serializes the given record to the given target output view.
|
BinaryMap |
toBinaryMap(InternalMap from) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdeserializeFromString, serializeToStringpublic Serializer<InternalMap> duplicate()
SerializerWe need this because Serializers might be used in several threads. Stateless serializers are inherently thread-safe while stateful serializers might not be thread-safe.
duplicate in interface Serializer<InternalMap>public InternalMap copy(InternalMap from)
copy in interface Serializer<InternalMap>from - The element reuse be copied.public void serialize(InternalMap record, DataOutputView target) throws IOException
Serializerserialize in interface Serializer<InternalMap>record - The record to serialize.target - The output view to write the serialized data to.IOException - Thrown, if the serialization encountered an I/O related error. Typically
raised by the output view, which may have an underlying I/O channel to which it
delegates.public BinaryMap toBinaryMap(InternalMap from)
public InternalMap deserialize(DataInputView source) throws IOException
Serializerdeserialize in interface Serializer<InternalMap>source - The input view from which to read the data.IOException - Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.public static Map<Object,Object> convertToJavaMap(InternalMap map, DataType keyType, DataType valueType)
InternalMap into Java Map, the keys and values of the Java map
still holds objects of internal data structures.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.