public interface Notification
DocumentEvents.
Notifications are meant to be the place for business logic to be applied around interesting data changes, where the result of that change applied to that business logic is one or more documents to be asynchronously published.
For example, if you have user data you wish to share asynchronously with some interested consumers, once a user was inserted or updated you would capture that change as a notification. Then, implement a notification to capture the business logic around what, if any, documents should be published as a result of that change.
DocumentEvent| Modifier and Type | Method and Description |
|---|---|
Future<Collection<DocumentEvent>> |
toDocumentEvents()
Immediately returns with a
Future representing the collection of
DocumentEvents this notification should produce. |
Future<Collection<DocumentEvent>> toDocumentEvents()
Future representing the collection of
DocumentEvents this notification should produce.
This method is expected to never throw an exception. Failures should be captured in the
returned Future.
Copyright © 2016. All rights reserved.