| Modifier and Type | Method and Description |
|---|---|
MongoSink<IN> |
build()
Constructs the
MongoSink with the properties configured this builder. |
MongoSinkBuilder<IN> |
setBatchIntervalMs(long batchIntervalMs)
Sets the batch flush interval, in milliseconds.
|
MongoSinkBuilder<IN> |
setBatchSize(int batchSize)
Sets the maximum number of actions to buffer for each batch request.
|
MongoSinkBuilder<IN> |
setCollection(String collection)
Sets the collection to sink of MongoDB.
|
MongoSinkBuilder<IN> |
setDatabase(String database)
Sets the database to sink of MongoDB.
|
MongoSinkBuilder<IN> |
setDeliveryGuarantee(org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee)
Sets the wanted
DeliveryGuarantee. |
MongoSinkBuilder<IN> |
setMaxRetries(int maxRetries)
Sets the max retry times if writing records failed.
|
MongoSinkBuilder<IN> |
setSerializationSchema(MongoSerializationSchema<IN> serializationSchema)
Sets the serialization schema which is invoked on every record to convert it to MongoDB bulk
request.
|
MongoSinkBuilder<IN> |
setUri(String uri)
Sets the connection string of MongoDB.
|
public MongoSinkBuilder<IN> setUri(String uri)
uri - connection string of MongoDBpublic MongoSinkBuilder<IN> setDatabase(String database)
database - the database to sink of MongoDB.public MongoSinkBuilder<IN> setCollection(String collection)
collection - the collection to sink of MongoDB.public MongoSinkBuilder<IN> setBatchSize(int batchSize)
batchSize - the maximum number of actions to buffer for each batch request.public MongoSinkBuilder<IN> setBatchIntervalMs(long batchIntervalMs)
batchIntervalMs - the batch flush interval, in milliseconds.public MongoSinkBuilder<IN> setMaxRetries(int maxRetries)
maxRetries - the max retry times.public MongoSinkBuilder<IN> setDeliveryGuarantee(org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee)
DeliveryGuarantee. The default delivery guarantee is DeliveryGuarantee.AT_LEAST_ONCEdeliveryGuarantee - which describes the record emission behaviourpublic MongoSinkBuilder<IN> setSerializationSchema(MongoSerializationSchema<IN> serializationSchema)
serializationSchema - to process records into MongoDB bulk WriteModel.Copyright © 2022–2025 The Apache Software Foundation. All rights reserved.