TDocument
- The type that this collection will encode the fullDocument
field into.public final class ChangeStreamDocument<TDocument> extends Object
$changeStream
aggregation output document.
Note: this class will not be applicable for all change stream outputs. If using custom pipelines that radically change the change stream result, then an alternative document format should be used.
Constructor and Description |
---|
ChangeStreamDocument(BsonDocument resumeToken,
MongoNamespace namespace,
TDocument fullDocument,
OperationType operationType,
UpdateDescription updateDescription)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
static <TFullDocument> |
createCodec(Class<TFullDocument> fullDocumentClass,
CodecRegistry codecRegistry)
Creates the codec for the specific ChangeStreamOutput type
|
boolean |
equals(Object o) |
TDocument |
getFullDocument()
Returns the fullDocument
|
MongoNamespace |
getNamespace()
Returns the namespace
|
OperationType |
getOperationType()
Returns the operationType
|
BsonDocument |
getResumeToken()
Returns the resumeToken
|
UpdateDescription |
getUpdateDescription()
Returns the updateDescription
|
int |
hashCode() |
String |
toString() |
public ChangeStreamDocument(@BsonProperty(value="resumeToken") BsonDocument resumeToken, @BsonProperty(value="namespace") MongoNamespace namespace, @BsonProperty(value="fullDocument") TDocument fullDocument, @BsonProperty(value="operationType") OperationType operationType, @BsonProperty(value="updateDescription") UpdateDescription updateDescription)
resumeToken
- the resume tokennamespace
- the namespacefullDocument
- the fullDocumentoperationType
- the operation typeupdateDescription
- the update descriptionpublic BsonDocument getResumeToken()
public MongoNamespace getNamespace()
public TDocument getFullDocument()
public OperationType getOperationType()
public UpdateDescription getUpdateDescription()
public static <TFullDocument> Codec<ChangeStreamDocument<TFullDocument>> createCodec(Class<TFullDocument> fullDocumentClass, CodecRegistry codecRegistry)
TFullDocument
- the fullDocument typefullDocumentClass
- the class to use to represent the fullDocumentcodecRegistry
- the codec registry