Skip to content

Instantly share code, notes, and snippets.

@winder
Created August 3, 2017 18:35
Show Gist options
  • Save winder/aed397eeb4de4e81e9cdaa57009290a0 to your computer and use it in GitHub Desktop.
Save winder/aed397eeb4de4e81e9cdaa57009290a0 to your computer and use it in GitHub Desktop.
public class TestListener implements MongoEventListener {
@Override
public void exportDocument(Document doc) {
System.out.println("Export: " + doc.toString());
}
@Override
public void delete(Delete entry) {
System.out.println("Delete: " + entry.getId());
}
@Override
public void insert(Insert entry) {
System.out.println("Delete: " + entry.getDocument().toString());
}
@Override
public void update(Update entry) {
System.out.println("Update: " + entry.getDocument().toString());
}
@Override
public void command(Command entry) {
System.out.println("Command: " + entry.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment