Class ChangeStreamOperation<T>

    • Constructor Detail

      • ChangeStreamOperation

        public ChangeStreamOperation​(MongoNamespace namespace,
                                     FullDocument fullDocument,
                                     List<BsonDocument> pipeline,
                                     Decoder<T> decoder)
        Deprecated. 
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        fullDocument - the fullDocument value
        pipeline - the aggregation pipeline.
        decoder - the decoder for the result documents.
      • ChangeStreamOperation

        public ChangeStreamOperation​(MongoNamespace namespace,
                                     FullDocument fullDocument,
                                     List<BsonDocument> pipeline,
                                     Decoder<T> decoder,
                                     ChangeStreamLevel changeStreamLevel)
        Deprecated. 
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        fullDocument - the fullDocument value
        pipeline - the aggregation pipeline.
        decoder - the decoder for the result documents.
        changeStreamLevel - the level at which the change stream is observing
        Since:
        3.8
    • Method Detail

      • getNamespace

        public MongoNamespace getNamespace​()
        Deprecated. 
        Returns:
        the namespace for this operation
      • getDecoder

        public Decoder<T> getDecoder​()
        Deprecated. 
        Returns:
        the decoder for this operation
      • getFullDocument

        public FullDocument getFullDocument​()
        Deprecated. 
        Returns the fullDocument value, in 3.6
        Returns:
        the fullDocument value
      • getResumeToken

        public BsonDocument getResumeToken​()
        Deprecated. 
        Returns the logical starting point for the new change stream.

        A null value represents the server default.

        Returns:
        the resumeAfter
      • resumeAfter

        public ChangeStreamOperation<T> resumeAfter​(BsonDocument resumeToken)
        Deprecated. 
        Sets the logical starting point for the new change stream.
        Parameters:
        resumeToken - the resumeToken
        Returns:
        this
      • getBatchSize

        public Integer getBatchSize​()
        Deprecated. 
        Gets the number of documents to return per batch. Default to 0, which indicates that the server chooses an appropriate batch size.
        Returns:
        the batch size, which may be null
        MongoDB documentation
        Batch Size
      • batchSize

        public ChangeStreamOperation<T> batchSize​(Integer batchSize)
        Deprecated. 
        Sets the number of documents to return per batch.
        Parameters:
        batchSize - the batch size
        Returns:
        this
        MongoDB documentation
        Batch Size
      • getMaxAwaitTime

        public long getMaxAwaitTime​(TimeUnit timeUnit)
        Deprecated. 
        The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored. A zero value will be ignored.
        Parameters:
        timeUnit - the time unit to return the result in
        Returns:
        the maximum await execution time in the given time unit
        MongoDB documentation
        Max Time
      • maxAwaitTime

        public ChangeStreamOperation<T> maxAwaitTime​(long maxAwaitTime,
                                                     TimeUnit timeUnit)
        Deprecated. 
        Sets the maximum await execution time on the server for this operation.
        Parameters:
        maxAwaitTime - the max await time. A value less than one will be ignored, and indicates that the driver should respect the server's default value
        timeUnit - the time unit, which may not be null
        Returns:
        this
      • getCollation

        public Collation getCollation​()
        Deprecated. 
        Returns the collation options
        Returns:
        the collation options
        MongoDB documentation
        Aggregation
      • collation

        public ChangeStreamOperation<T> collation​(Collation collation)
        Deprecated. 
        Sets the collation options

        A null value represents the server default.

        Parameters:
        collation - the collation options to use
        Returns:
        this
        MongoDB documentation
        Aggregation
      • startAtOperationTime

        public ChangeStreamOperation<T> startAtOperationTime​(BsonTimestamp startAtOperationTime)
        Deprecated. 
        The change stream will only provides changes that occurred after the specified timestamp.

        Any command run against the server will return an operation time that can be used here.

        The default value is an operation time obtained from the server before the change stream was created.

        Parameters:
        startAtOperationTime - the start at operation time
        Returns:
        this
        Since:
        3.8
        MongoDB documentation
        reference/method/db.runCommand/
        Since server release
        4.0
      • getStartAtOperationTime

        public BsonTimestamp getStartAtOperationTime​()
        Deprecated. 
        Returns the start at operation time
        Returns:
        the start at operation time
        Since:
        3.8
        Since server release
        4.0
      • execute

        public BatchCursor<T> execute​(ReadBinding binding)
        Deprecated. 
        Description copied from interface: ReadOperation
        General execute which can return anything of type T
        Specified by:
        execute in interface ReadOperation<T>
        Parameters:
        binding - the binding to execute in the context of
        Returns:
        T, the result of the execution