public void onMessageReceived(RecoverFromMissedDocOpsResponse message) {
// 4) Process the doc ops while I was disconnected (which will include our ack)
JsonArray<ServerToClientDocOp> recoveredServerDocOps = message.getDocOps();
for (int i = 0; i < recoveredServerDocOps.size(); i++) {
ServerToClientDocOp serverDocOp = recoveredServerDocOps.get(i);
if (serverDocOp.getAppliedCcRevision() > revisionProvider.revision()) {
docOpReceiver.simulateOrderedDocOpReceived((ServerToClientDocOpImpl) serverDocOp,
true);
}
}
// 5) Process queued doc ops while I was recovering
JsonArray<ServerToClientDocOp> queuedServerDocOps =
docOpReceiver.getOrderedQueuedServerToClientDocOps();
for (int i = 0; i < queuedServerDocOps.size(); i++) {
ServerToClientDocOp serverDocOp = queuedServerDocOps.get(i);
if (serverDocOp.getAppliedCcRevision() > revisionProvider.revision()) {
docOpReceiver.simulateOrderedDocOpReceived((ServerToClientDocOpImpl) serverDocOp,
true);
}
}