co.decodable.sdk.pipeline.internal.DelegatingStatefulSinkWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of decodable-pipeline-sdk Show documentation
Show all versions of decodable-pipeline-sdk Show documentation
A software development kit for implementing Apache Flink jobs and running them on Decodable
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright Decodable, Inc.
*
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package co.decodable.sdk.pipeline.internal;
import co.decodable.sdk.pipeline.DecodableWriter;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import org.apache.flink.api.connector.sink2.StatefulSink.StatefulSinkWriter;
import org.apache.flink.api.connector.sink2.TwoPhaseCommittingSink;
@SuppressWarnings("unchecked")
public class DelegatingStatefulSinkWriter implements DecodableWriter {
// Can't use the Kafka sink's implementation, as it exposes non-public types in its signatures
private final StatefulSinkWriter delegate;
public DelegatingStatefulSinkWriter(StatefulSinkWriter delegate) {
this.delegate = delegate;
}
@Override
public void write(T element, Context context) throws IOException, InterruptedException {
delegate.write(element, context);
}
@Override
public void flush(boolean endOfInput) throws IOException, InterruptedException {
delegate.flush(endOfInput);
}
@Override
public void close() throws Exception {
delegate.close();
}
@Override
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy