/** * Creates a change stream for this client. * * @param pipeline the aggregation pipeline to apply to the change stream * @param resultClass the class to decode each document into * @param <TResult> the target document type of the iterable. * @return the change stream iterable * @since 3.8 * @mongodb.server.release 4.0 * @mongodb.driver.dochub core/changestreams Change Streams */ public <TResult> ChangeStreamIterable<TResult> watch(final List<? extends Bson> pipeline, final Class<TResult> resultClass) { return createChangeStreamIterable(null, pipeline, resultClass); }
/** * Creates a change stream for this client. * * @param clientSession the client session with which to associate this operation * @param pipeline the aggregation pipeline to apply to the change stream * @param resultClass the class to decode each document into * @param <TResult> the target document type of the iterable. * @return the change stream iterable * @since 3.8 * @mongodb.server.release 4.0 * @mongodb.driver.dochub core/changestreams Change Streams */ public <TResult> ChangeStreamIterable<TResult> watch(final ClientSession clientSession, final List<? extends Bson> pipeline, final Class<TResult> resultClass) { notNull("clientSession", clientSession); return createChangeStreamIterable(clientSession, pipeline, resultClass); }
/** * Creates a change stream for this client. * * @param pipeline the aggregation pipeline to apply to the change stream * @param resultClass the class to decode each document into * @param <TResult> the target document type of the iterable. * @return the change stream iterable * @since 3.8 * @mongodb.server.release 4.0 * @mongodb.driver.dochub core/changestreams Change Streams */ public <TResult> ChangeStreamIterable<TResult> watch(final List<? extends Bson> pipeline, final Class<TResult> resultClass) { return createChangeStreamIterable(null, pipeline, resultClass); }
/** * Creates a change stream for this client. * * @param clientSession the client session with which to associate this operation * @param pipeline the aggregation pipeline to apply to the change stream * @param resultClass the class to decode each document into * @param <TResult> the target document type of the iterable. * @return the change stream iterable * @since 3.8 * @mongodb.server.release 4.0 * @mongodb.driver.dochub core/changestreams Change Streams */ public <TResult> ChangeStreamIterable<TResult> watch(final ClientSession clientSession, final List<? extends Bson> pipeline, final Class<TResult> resultClass) { notNull("clientSession", clientSession); return createChangeStreamIterable(clientSession, pipeline, resultClass); }