Class AsyncSinkWriterStateSerializer<RequestEntryT extends Serializable>
java.lang.Object
org.apache.flink.connector.base.sink.writer.AsyncSinkWriterStateSerializer<RequestEntryT>
- Type Parameters:
RequestEntryT- Writer Request Entry type
- All Implemented Interfaces:
org.apache.flink.core.io.SimpleVersionedSerializer<BufferedRequestState<RequestEntryT>>,org.apache.flink.core.io.Versioned
@PublicEvolving
public abstract class AsyncSinkWriterStateSerializer<RequestEntryT extends Serializable>
extends Object
implements org.apache.flink.core.io.SimpleVersionedSerializer<BufferedRequestState<RequestEntryT>>
Serializer class for
AsyncSinkWriter state.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(int version, byte[] serialized) protected abstract RequestEntryTdeserializeRequestFromStream(long requestSize, DataInputStream in) byte[]Serializes state in form of [DATA_IDENTIFIER,NUM_OF_ELEMENTS,SIZE1,REQUEST1,SIZE2,REQUEST2....].protected abstract voidserializeRequestToStream(RequestEntryT request, DataOutputStream out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.core.io.SimpleVersionedSerializer
getVersion
-
Constructor Details
-
AsyncSinkWriterStateSerializer
public AsyncSinkWriterStateSerializer()
-
-
Method Details
-
serialize
Serializes state in form of [DATA_IDENTIFIER,NUM_OF_ELEMENTS,SIZE1,REQUEST1,SIZE2,REQUEST2....].- Specified by:
serializein interfaceorg.apache.flink.core.io.SimpleVersionedSerializer<RequestEntryT extends Serializable>- Throws:
IOException
-
deserialize
public BufferedRequestState<RequestEntryT> deserialize(int version, byte[] serialized) throws IOException - Specified by:
deserializein interfaceorg.apache.flink.core.io.SimpleVersionedSerializer<RequestEntryT extends Serializable>- Throws:
IOException
-
serializeRequestToStream
protected abstract void serializeRequestToStream(RequestEntryT request, DataOutputStream out) throws IOException - Throws:
IOException
-
deserializeRequestFromStream
protected abstract RequestEntryT deserializeRequestFromStream(long requestSize, DataInputStream in) throws IOException - Throws:
IOException
-