Class BufferedRequestState<RequestEntryT extends Serializable>
- java.lang.Object
-
- org.apache.flink.connector.base.sink.writer.BufferedRequestState<RequestEntryT>
-
- Type Parameters:
RequestEntryT
- request type.
- All Implemented Interfaces:
Serializable
@PublicEvolving public class BufferedRequestState<RequestEntryT extends Serializable> extends Object implements Serializable
Class holding state ofAsyncSinkWriter
needed at taking a snapshot. The state captures thebufferedRequestEntries
buffer for the writer at snapshot to resume the requests. This guarantees at least once semantic in sending requests where restoring from a snapshot where buffered requests were flushed to the sink will cause duplicate requests.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BufferedRequestState(Deque<RequestEntryWrapper<RequestEntryT>> bufferedRequestEntries)
BufferedRequestState(List<RequestEntryWrapper<RequestEntryT>> bufferedRequestEntries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends Serializable>
BufferedRequestState<T>emptyState()
List<RequestEntryWrapper<RequestEntryT>>
getBufferedRequestEntries()
long
getStateSize()
-
-
-
Constructor Detail
-
BufferedRequestState
public BufferedRequestState(Deque<RequestEntryWrapper<RequestEntryT>> bufferedRequestEntries)
-
BufferedRequestState
public BufferedRequestState(List<RequestEntryWrapper<RequestEntryT>> bufferedRequestEntries)
-
-
Method Detail
-
getBufferedRequestEntries
public List<RequestEntryWrapper<RequestEntryT>> getBufferedRequestEntries()
-
getStateSize
public long getStateSize()
-
emptyState
public static <T extends Serializable> BufferedRequestState<T> emptyState()
-
-