public class GenericJobEventSerializer extends Object implements SimpleVersionedSerializer<JobEvent>
JobEvent
instances that uses Flink's InstantiationUtil
for
serialization and deserialization.Modifier and Type | Field and Description |
---|---|
static GenericJobEventSerializer |
INSTANCE |
Constructor and Description |
---|
GenericJobEventSerializer() |
Modifier and Type | Method and Description |
---|---|
JobEvent |
deserialize(int version,
byte[] bytes)
De-serializes the given data (bytes) which was serialized with the scheme of the indicated
version.
|
int |
getVersion()
Gets the version with which this serializer serializes.
|
byte[] |
serialize(JobEvent jobEvent)
Serializes the given object.
|
public static final GenericJobEventSerializer INSTANCE
public int getVersion()
SimpleVersionedSerializer
getVersion
in interface SimpleVersionedSerializer<JobEvent>
getVersion
in interface Versioned
public byte[] serialize(JobEvent jobEvent) throws IOException
SimpleVersionedSerializer
SimpleVersionedSerializer.getVersion()
.serialize
in interface SimpleVersionedSerializer<JobEvent>
jobEvent
- The object to serialize.IOException
- Thrown, if the serialization fails.public JobEvent deserialize(int version, byte[] bytes) throws IOException
SimpleVersionedSerializer
deserialize
in interface SimpleVersionedSerializer<JobEvent>
version
- The version in which the data was serializedbytes
- The serialized dataIOException
- Thrown, if the deserialization fails.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.