Class MongoSourceBuilder

java.lang.Object
com.hazelcast.jet.mongodb.MongoSourceBuilder

public final class MongoSourceBuilder extends Object
Top-level class for MongoDB custom source builders.

For details refer to the factory methods:

Since:
5.3
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    static final class 
  • Method Summary

    Modifier and Type
    Method
    Description
    static MongoSourceBuilder.Batch<org.bson.Document>
    batch(com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.
    static MongoSourceBuilder.Batch<org.bson.Document>
    batch(com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.
    static MongoSourceBuilder.Batch<org.bson.Document>
    batch(String name, com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.
    static MongoSourceBuilder.Batch<org.bson.Document>
    batch(String name, com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.
    static MongoSourceBuilder.Stream<org.bson.Document>
    stream(com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.
    static MongoSourceBuilder.Stream<org.bson.Document>
    stream(com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.
    static MongoSourceBuilder.Stream<org.bson.Document>
    stream(String name, com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.
    static MongoSourceBuilder.Stream<org.bson.Document>
    stream(String name, com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
    Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • batch

      @Nonnull public static MongoSourceBuilder.Batch<org.bson.Document> batch(@Nonnull String name, @Nonnull com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.

      Here's an example that builds a simple source which queries all the documents in a collection and emits the items as a string by transforming each item to json.

      Parameters:
      name - a descriptive name for the source (diagnostic purposes)
      clientSupplier - a function that creates MongoDB client
    • batch

      @Nonnull public static MongoSourceBuilder.Batch<org.bson.Document> batch(@Nonnull com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.

      Here's an example that builds a simple source which queries all the documents in a collection and emits the items as a string by transforming each item to json.

      Parameters:
      clientSupplier - a function that creates MongoDB client
    • batch

      @Nonnull public static MongoSourceBuilder.Batch<org.bson.Document> batch(@Nonnull String name, @Nonnull com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.

      Here's an example that builds a simple source which queries all the documents in a collection and emits the items as a string by transforming each item to json.

      Parameters:
      name - a descriptive name for the source (diagnostic purposes)
      dataConnectionRef - a reference to some mongo data connection
    • batch

      @Nonnull public static MongoSourceBuilder.Batch<org.bson.Document> batch(@Nonnull com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB BatchSource for the Pipeline API.

      Here's an example that builds a simple source which queries all the documents in a collection and emits the items as a string by transforming each item to json.

      Parameters:
      dataConnectionRef - a reference to some mongo data connection
    • stream

      @Nonnull public static MongoSourceBuilder.Stream<org.bson.Document> stream(@Nonnull String name, @Nonnull com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.

      The created source will not be distributed, a single processor instance will be created on an arbitrary member. The source provides native timestamps using ChangeStreamDocument.getClusterTime() and fault tolerance using ChangeStreamDocument.getResumeToken().

      Parameters:
      name - a descriptive name for the source (diagnostic purposes)
      clientSupplier - a function that creates MongoDB client
    • stream

      @Nonnull public static MongoSourceBuilder.Stream<org.bson.Document> stream(@Nonnull com.hazelcast.function.SupplierEx<? extends com.mongodb.client.MongoClient> clientSupplier)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.

      The created source will not be distributed, a single processor instance will be created on an arbitrary member. The source provides native timestamps using ChangeStreamDocument.getClusterTime() and fault tolerance using ChangeStreamDocument.getResumeToken().

      Parameters:
      clientSupplier - a function that creates MongoDB client
    • stream

      @Nonnull public static MongoSourceBuilder.Stream<org.bson.Document> stream(@Nonnull String name, @Nonnull com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.

      The source provides native timestamps using ChangeStreamDocument.getWallTime() and fault tolerance using ChangeStreamDocument.getResumeToken().

      Parameters:
      name - a descriptive name for the source (diagnostic purposes)
      dataConnectionRef - a reference to some mongo data connection
    • stream

      @Nonnull public static MongoSourceBuilder.Stream<org.bson.Document> stream(@Nonnull com.hazelcast.jet.pipeline.DataConnectionRef dataConnectionRef)
      Returns a builder object that offers a step-by-step fluent API to build a custom MongoDB StreamSource for the Pipeline API.

      The source provides native timestamps using ChangeStreamDocument.getWallTime() and fault tolerance using ChangeStreamDocument.getResumeToken().

      Parameters:
      dataConnectionRef - a reference to some mongo data connection