Class FixedDestinationResolver
java.lang.Object
io.github.flink.gcp.connector.cloudtasks.sink.FixedDestinationResolver
- All Implemented Interfaces:
DestinationResolver<Object>,Serializable
@Internal
public final class FixedDestinationResolver
extends Object
implements DestinationResolver<Object>
A
DestinationResolver returning one fixed destination for every record.
A named class (instead of a synthesized lambda) because lambda serialization would tie the job
graph to fragile SerializedLambda synthetic-method identity across connector versions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFixedDestinationResolver(QueueDestination destination) Creates a resolver returning the given destination for every record. -
Method Summary
Modifier and TypeMethodDescriptionReturns the fixed destination.Returns the destination queue for the given record.
-
Constructor Details
-
FixedDestinationResolver
Creates a resolver returning the given destination for every record.- Parameters:
destination- the destination queue
-
-
Method Details
-
getDestination
Returns the fixed destination. -
resolve
public QueueDestination resolve(Object element, org.apache.flink.api.connector.sink2.SinkWriter.Context context) Description copied from interface:DestinationResolverReturns the destination queue for the given record.- Specified by:
resolvein interfaceDestinationResolver<Object>- Parameters:
element- the recordcontext- writer context exposing the record's event timestamp and current watermark- Returns:
- the destination queue; never
null
-